> Additionally, there is another problem: If the cycle is not
> temporarily revived, and you call __del__ manually, it may break the
> cycle by removing the references.
> Thus, objects in the cycle will go down to refcount=0 during your
> attempt to call __del__'s on the objects in the cycle.
> The only sane thing is to temporarily revive the entire cycle so you
> can safely call __del__'s on it.  Then, you might want to disable the
> normal __del__ calling that occurs as part of the later destruction of
> the cycle.

I still don't understand what "revive the cycle" means. You will need to
incref the object for which you call __del__, that's all.

Regards,
Martin
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to