Re: New destructors implementation

From: Date: Sat, 07 Feb 2004 10:03:51 +0000
Subject: Re: New destructors implementation
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-7639@lists.php.net to get a copy of this message
== Quote from Zeev Suraski (zeev@zend.com)'s article > To make a long story short, no. Circular references are hardly the > problem, even a one-sided reference can be problematic. Just one example > (there are many others) - you have $container and $obj, both are global > variables, $container has a reference to $obj and uses it during > destruction. Voila, you have a problem - you have to somehow ensure that > $obj's destructor is called only after $container's destructor. Zeev, There's something I don't understand: destruction order respects dependences when existing functions (except for circular references, but it's normal). So why does it seem so complicated to implement the same mechanism for global variables at a first step? This would resolve all the non-circular references. And then, in an unpredictable order for remaining variables. Regards, Stephane

« previous php.internals (#7639) next »