#37707 [Asn->Csd]: clone without assigning leaks memory
ID: 37707
Updated by: iliaa@php.net
Reported By: nlopess@php.net
-Status: Assigned
+Status: Closed
Bug Type: Scripting Engine problem
Operating System: n/a
PHP Version: 5CVS-2006-06-05 (CVS)
Assigned To: dmitry
New Comment:
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2006-06-05 23:48:42] nlopess@php.net
I even made a patch =) :
http://mega.ist.utl.pt/~ncpl/zend_clone_memleak.txt
------------------------------------------------------------------------
[2006-06-05 23:17:06] nlopess@php.net
so here it goes..
------------------------------------------------------------------------
[2006-06-05 23:16:45] nlopess@php.net
Description:
------------
cloning an object without assigning the return value to a variable
leaks memory.
Reproduce code:
---------------
<?
class xpto {}
clone new xpto();
/* or:
$a = new xpto();
clone $a;
*/
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=37707&edit=1
Thread (4 messages)