我需要担心 PHP 的内存泄漏吗?特别是,我有以下从浏览器调用的代码。调用完成后,是否所有内容都已正确清理,或者我是否需要清除由创建的第一个数组创建的内存?
class SomeClass
{
var $someArray = array();
function someMethod()
{
$this->someArray[1] = "Some Value 1";
$this->someArray[2] = "Some Value 2";
$this->someArray[3] = "Some Value 3";
$this->someArray = array();
$this->someArray[1] = "Some other Value";
$this->someArray[2] = "Some other Value";
$this->someArray[3] = "Some other Value";
}
}
someMethod();
谢谢,斯科特