== Quote from Stephane Drouard ([EMAIL PROTECTED])'s article
> == Quote from Andi Gutmans ([EMAIL PROTECTED])'s article
> > He doesn't necessarily own a reference but tries to access it in the
> > destructor.
>
> IMO, this is bad programming. If an object wants to access another object (global or 
> not), it has to own a reference on it, to guaranty the referenced object will be 
> destroyed afterwards (so including destructor).

Couldn't PHP destroy global objects by taking their refcount into account? All objects 
with refcount=1 are first destroyed, then all objects with refcount=2, and so on... 
Objects with a same refcount are destroyed in a random "order".

Stephane

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

Reply via email to