Re: GC issue wrt. to resource <-> object cycles?

From: Date: Wed, 10 Aug 2016 11:38:01 +0000
Subject: Re: GC issue wrt. to resource <-> object cycles?
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-95001@lists.php.net to get a copy of this message
2016-08-10 12:59 GMT+02:00 Nikita Popov <nikita.ppv@gmail.com>: > On Wed, Aug 10, 2016 at 12:52 PM, Christoph M. Becker <cmbecker69@gmx.de> > wrote: > The simplest way to fix ext/xml in particular is probably to migrate it to > use an object instead of a resource. > > Nikita If my memory strikes me right, then we did do this for ext/gmp too a while back for the operator overloading (I even think it was you that did that?). Maybe it would be time to evaluate the situation in 7.2, for extensions that still use resources[1] that could be affected by similar issues and adapt them hereafter. Looking at the code we also got this "special" resource, which is not exposed to the userland, called an "index pointer"[2], which only a few extensions are using (interbase, oci8, odbc & pgsql), is this a hack? [1] https://gist.github.com/KalleZ/df08b99efc7c7166cfa36aab2dbe8160 [2] https://gist.github.com/KalleZ/b5b8d47f3d523c9e806188c85aa10c68 -- regards, Kalle Sommer Nielsen kalle@php.net

« previous php.internals (#95001) next »