In article <[EMAIL PROTECTED]>,
Ken  <[EMAIL PROTECTED]> wrote:
>Simon Pickles wrote:
>>
>> For instance, I have a manager looking after many objects in a dict. 
>> When those objects are no longer needed, I use del manager[objectid], 
>> hoping to force the garbage collector to perform the delete.
>>
>> However, this doesn't trigger my overloaded __del__ destructor. Can I 
>> simply rely on the python garbage collector to take it from here?
>   
>Objects are deleted at some undefined time after there are no references 
>to the object.

Assuming we're talking about CPython, objects are deleted immediately
when there are no references to the object.  The problem is that it's
not always obvious when the refcount goes to zero.
-- 
Aahz ([EMAIL PROTECTED])           <*>         http://www.pythoncraft.com/

"All problems in computer science can be solved by another level of     
indirection."  --Butler Lampson
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to