"tomer filiba" <[EMAIL PROTECTED]> wrote:
> the current gc already detects cyclic referencing between objects,
> and by what i understood, it can free the memory the objects take,
> but __del__ is never call because there's not telling where to
> start the __del__ chain.

Not all cyclic references are easily discovered during assignment, and
could induce huge overhead during assignments in general.

According to my experience, there are two great ways of dealing with
object cycles:
1. never write __del__ methods
2. use weakrefs

The former avoids the __del__ never being called mess assuming that you
don't need any manual cleanup, and the latter allows for arbitrary
cleanup methods.


 - Josiah

_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to