Re: [PHP-DEV] Re: Weak Closures

2022-01-22 Thread Christoph M. Becker
On 22.01.2022 at 17:18, Rowan Tommins wrote: > On 22/01/2022 15:30, Christoph M. Becker wrote: > >> If you trigger the garbage collector manually (i.e. call >> gc_collect_cycles() after unset($callback)), the loop terminates right >> away.  I'm not sure why it doesn't without manually triggering t

Re: [PHP-DEV] Re: Weak Closures

2022-01-22 Thread Rowan Tommins
On 22/01/2022 15:30, Christoph M. Becker wrote: If you trigger the garbage collector manually (i.e. call gc_collect_cycles() after unset($callback)), the loop terminates right away. I'm not sure why it doesn't without manually triggering the GC. Most values are freed as soon as their refcount