[issue9417] Declaring a class creates circular references
report at bugs.python.org
Thu Jul 29 17:23:11 CEST 2010
Andrea Corbellini <corbellini.andrea at gmail.com> added the comment:
Disabling the GC can increase performances (although not significantly). But this bug is the cause of other problems too: what if the metaclass contains a __del__() method?
An another issue that I've found is that debugging is harder. I always try to avoid to create ref cycles in my code, also if my objects are collectable. In this way, I'm sure that I'll always be able to add a __del__ method in the future without problems. However, I can't easily check ref cycles without manually inspecting `gc.garbage`.
And also, specifying DEBUG_SAVEALL will put all the deleted classes and their attributes in the garbage, which makes debugging *very* hard in case of a leaking program.
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list