ID:               48369
 Updated by:       j...@php.net
 Reported By:      busia at tiscali dot it
-Status:           Open
+Status:           Bogus
 Bug Type:         Scripting Engine problem
 Operating System: Windows
 PHP Version:      5.3.0RC2
 New Comment:

Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.




Previous Comments:
------------------------------------------------------------------------

[2009-05-23 17:27:29] busia at tiscali dot it

Description:
------------
When I unset an array containing object, the memory is not freed as
expected. Too much memory is still used.

Reproduce code:
---------------
<?
ini_set('memory_limit','300M');
class a {
}

echo memory_get_usage()."\n";
$a=array();
for ($i=0; $i<=1000000; $i++) {
        $a[]= new a();
}
echo memory_get_usage()."\n";
unset($a);
echo memory_get_usage()."\n";
?>

Expected result:
----------------
325776
230042304
circa 325776

Actual result:
--------------
325776
230042304
33977912


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=48369&edit=1

Reply via email to