Re: New destructors implementation
| From: | Zeev Suraski | Date: | Mon, 09 Feb 2004 11:58:41 +0000 |
| Subject: | Re: New destructors implementation | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-7659@lists.php.net to get a copy of this message | ||
At 12:38 09/02/2004, Stephane Drouard wrote:
== Quote from Zeev Suraski (zeev@zend.com)'s article If you're talking about destruction that honors reference counts (which has nothing to do with order, it's still randomly-ordered), then yes, it's *generally* ok. Yes, I was talking about that point. But that what we had before, and it had tons of problems. For instance, do you want to give up the ability to access the symbol table (e.g. $GLOBALS) from destructors? Because the symtable elements won't have anything to protect them from being deleted, their refcount is 1. Just in case you're willing to live without it, it did use to be that way, and people did complain :) Do you mean that global variables have their refcount "locked to 1", or "never less than 1"? For sure if they are "locked to 1", I now understand why destruction of such objects can't reflect "dependences".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'. Zeev