Re: Re: [RFC] Magic Method that handles unset($object)

From: Date: Sun, 10 Dec 2006 23:02:53 +0000
Subject: Re: Re: [RFC] Magic Method that handles unset($object)
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-26891@lists.php.net to get a copy of this message
Sebastian Bergmann wrote:
Sara Golemon wrote:
To do this >right< you'd need notification, not just that unset() was called on the object, but what the current state of *both* of its relevant reference counts are.
I fail to see why. If we introduce a method that is called for unset() then there should be no problem with resetting the $children attribute to array() in my example: In what way is this different from defining method close() and instead of unset($object) call $object->close()?
What happens if you have more than one non-child reference to parent? -- Ants Aasma

« previous php.internals (#26891) next »