At 01:36 PM 2/9/2004 +0000, Stephane Drouard wrote:
== Quote from Zeev Suraski ([EMAIL PROTECTED])'s article
> They're not locked to 1, and nothing in a symbol table will ever be with a
> refcount of less than 1...  But generally, all global variables (or for
> that matter, all variables period) have a refcount of 1, unless you do
> something 'special'.

Right. So if a global variable "father" owns a reference to another global variable "child", I assume "child"'s refcount is higher than "father"'s one, let's say 2 for "child" ($GLOBALS + "father") and 1 for "father" ($GLOBALS), assuming they are not referenced elsewhere.
So why PHP can't guaranty that "father"'s destructor is called before "child"'s one?

He doesn't necessarily own a reference but tries to access it in the destructor.


Andi

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



Reply via email to