[PHP-DEV] [PATCH] Bug #60139 closure memory leaks

2011-10-29 Thread Arnaud Le Blanc
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,

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] [VOTE] DateTime and Daylight Saving Time Transitions

2011-10-29 Thread Daniel Convissor
Hi Stas:

 That's what I don't understand - so in the real code, what would be
 the use case where I'd want to use ST/DST? I.e., if I know the exact
 time, I could just use the timestamp or GMT time which doesn't have
 transitions.

Yeah, this stuff is very edge case.  It is for use when one needs to
have the transition information and create a time zone object that's in
the repeated period during a backward transition.  One case it's needed
is in unit testing DateTime.

Thanks,

--Dan

-- 
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
data intensive web and database programming
http://www.AnalysisAndSolutions.com/
 4015 7th Ave #4, Brooklyn NY 11232  v: 718-854-0335 f: 718-854-0409

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php