#37707 [Asn]: clone without assigning leaks memory

From: Date: Mon, 05 Jun 2006 23:48:43 +0000
Subject: #37707 [Asn]: clone without assigning leaks memory
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-98069@lists.php.net to get a copy of this message
 ID:               37707
 Updated by:       nlopess@php.net
 Reported By:      nlopess@php.net
 Status:           Assigned
 Bug Type:         Scripting Engine problem
 Operating System: n/a
 PHP Version:      5CVS-2006-06-05 (CVS)
 Assigned To:      dmitry
 New Comment:

I even made a patch =) :
http://mega.ist.utl.pt/~ncpl/zend_clone_memleak.txt


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

[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)

« previous php.bugs (#98069) next »