[PATCH] Bug #60139 closure memory leaks

From: Date: Sat, 29 Oct 2011 11:44:27 +0000
Subject: [PATCH] Bug #60139 closure memory leaks
Groups: php.internals 
Request: Send a blank email to internals+get-55988@lists.php.net to get a copy of this message
Hi, Closures can hold references to variables, but don't expose them to the garbage collector. The GC is unable to find cycles in which a closure is involved, and this can create memory leaks. I've reported this problem in https://bugs.php.net/bug.php?id=60139 and posted a patch. Can someone please review it ? This fixes the problem by returning the closure's closed variables and this_ptr from get_properties (most of this has been copied from SplObjectStorage's get_properties). I would like to commit in 5.3 as well. Best Regards,

« previous php.internals (#55988) next »