Re: New destructors implementation

From: Date: Thu, 05 Feb 2004 21:16:58 +0000
Subject: Re: New destructors implementation
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-7620@lists.php.net to get a copy of this message
On Thu, 05 Feb 2004, Zeev Suraski wrote: > Internal objects as in the ones in reflection and similar? Yes. But I'd > imagine that for most other objects which completely overload the behavior, > you wouldn't need that. Generally, if your object should be able to call > __destruct() *AND* it's a PHP-style object (has the same structure), it > should use that callback, otherwise - not. > > Be advised that your __destruct() mustn't actually render the object > unusuable to the degree that PHP would crash if it touches it. It *may* be > referenced after __destruct() is called (it would be an error on the > author's part to do that, but nothing will prevent him from doing that). So you are saying I can delegate calling __destruct() to Zend and then worry only about freeing storage in my objects? - Andrei

« previous php.internals (#7620) next »