Re: Don't add simple objects to GC's roots

From: Date: Thu, 27 Jul 2017 13:00:52 +0000
Subject: Re: Don't add simple objects to GC's roots
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-100060@lists.php.net to get a copy of this message
Hi, > On 26 Jul 2017, at 22:57, Nicolas Grekas <nicolas.grekas@gmail.com> wrote: > > There is a way to work around: just call gc_disable(). But this means > dealing with side effects of the engine in userland. Moreover, this also > means leaking memory, since meanwhile roots are not populated. Maybe we could make gc_disable accept one reference zval as parameter, and clear the GC_COLLECTABLE flag of zval.value->gc.u.v.flags. So, this zval will never be put into gc root list.

« previous php.internals (#100060) next »