#33711 [Opn->Bgs]: unset() doesn't destroy object with internal references
| From: | helly@php.net | Date: | Fri, 15 Jul 2005 19:57:52 +0000 |
| Subject: | #33711 [Opn->Bgs]: unset() doesn't destroy object with internal references | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-81909@lists.php.net to get a copy of this message | ||
ID: 33711
Updated by: helly@php.net
Reported By: mike dot hall at twistdigital dot co dot uk
-Status: Open
+Status: Bogus
Bug Type: Class/Object related
Operating System: FreeBSD
PHP Version: 5.1.0b2
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
.
Previous Comments:
------------------------------------------------------------------------
[2005-07-15 16:50:41] mike dot hall at twistdigital dot co dot uk
Description:
------------
PHP doesn't unset an object if it contains variables that include
references to itself. Despite being unset, the objects remain in memory
until the end of the request. This can lead to scripts consuming large
amounts of memory when larger and more complex objects are being
employed.
Reproduce code:
---------------
http://www.indelible.org.uk/reproduce.php
Expected result:
----------------
0
Create A
Create B
Destroying B
Destroying A
1
Create A
Create B
Destroying B
Destroying A
2
Create A
Create B
Destroying B
Destroying A
End of Loop
Actual result:
--------------
0
Create A
Create B
1
Create A
Create B
2
Create A
Create B
End of Loop
Destroying A
Destroying B
Destroying A
Destroying B
Destroying A
Destroying B
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=33711&edit=1