Hello Curt,

Monday, August 9, 2004, 7:46:07 PM, you wrote:

> * Thus wrote Ron Korving:
>> i think the object will only cease to exist when all references to it are
>> gone

> Well there does seem to be another layer of referencing, since the
> a simple assignment without &$ will simply reference the object but
> in a different way.  The problem I'm running into there doesn't
> seem to be a way to reliably detstroy an object without the
> programmer keeping track of the variable assignments and removing
> those references as well.

> I'm not sure if its possible or even php's responsibility but
> perhaps provide a tool that allow's a programmer to explicity
> destroy an object?  with something like:

>   Destroy($obj);


This is not possible at all. Reference counting + garbage collection
means we do know the exact number of references to an object. Destroying
the referenced object before its reference count goes to zero means that
we leave a reference pointing to nirvana. That would result in a SEGV.

regards
marcus

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

Reply via email to