
Jan. 2, 2003
7:14 a.m.
[Aahz]
Because garbage cycles can point at non-garbage; when the garbage is reclaimed, __del__() methods will run.
[François Pinard]
When cycles contain `__del__()', they are wholly added to gc.garbage if I understand the documentation correctly, and so, `__del__()' will not be run.
True, but objects that are not *in* a cycle but that were kept alive because the cycle referenced them will have their __del__ methods run when the cycle is GC'ed. --Guido van Rossum (home page: http://www.python.org/~guido/)