|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37707 clone without assigning leaks memory
Submitted: 2006-06-05 23:16 UTC Modified: 2006-06-07 13:44 UTC
From: Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 5CVS-2006-06-05 (CVS) OS: n/a
Private report: No CVE-ID:
 [2006-06-05 23:16 UTC]
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;


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-06-05 23:17 UTC]
so here it goes..
 [2006-06-05 23:48 UTC]
I even made a patch =) :
 [2006-06-07 13:44 UTC]
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
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2015 The PHP Group
All rights reserved.
Last updated: Tue Dec 01 00:01:32 2015 UTC