[Python-Dev] Tackling circular dependencies in 2.0?

Guido van Rossum guido@CNRI.Reston.VA.US
Tue, 21 Sep 1999 09:13:19 -0400


> Not calling the destructor will cause leakage in all objects
> allocating extra storage, such as lists, instances and
> probably just about any dynamically sized object there is in
> Python... solving the problem only half way. Plus you will
> definitely run into trouble as soon as external resources
> are involved, e.g. open files or connections to databases.

If I remember well, the only destructors not called would be __del__
methods, since the dependencies between to-be-deleted instances are
unknown to the collector.  Regular (C-level) destructors would of
course be called.

--Guido van Rossum (home page: http://www.python.org/~guido/)