Zeev Suraski wrote:
At 00:58 07/02/2004, Christian Jerono wrote:

Well so wouldn't 'reverse construction order' mean:
$container=...;
$obj = $container->getFoo();
results in call of $obj->__destruct(); and then $container->__destruct();
maybe i just missed the problem here?


Yes, and yes you did :) The whole problem is if $container needs to use Foo, its element, during destruction.
Well, the $obj reference would be "freed" first (--refcount), then all left would be $container (which still holds a reference to its $m_foo data member). Without having circular references and stuff, it should be possible to clean up the data members of a particular instance after the corresponding destructor call, I suppose.

Cheers,
Michael

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



Reply via email to