[Python-Dev] Python 2.3a1's mandatory use of cyclic GC causes existing applications to fail

Tim Peters tim.one@comcast.net
Wed, 05 Feb 2003 13:07:05 -0500


[Fred L. Drake, Jr.]
> Why would creating new style classes create cycles?  The links between
> a type and derived types use weak references, which do not rely on the
> cycle GC support.

>>> def f():
...    class C(object):
...       pass
...
[9589 refs]
>>> f()
[9611 refs]
>>> f()
[9632 refs]
>>> f()
[9653 refs]
>>> f()
[9674 refs]
>>> f()
[9695 refs]
>>> f()
[9716 refs]
>>> f()
[9737 refs]
>>> f()
[9758 refs]
>>> import gc
[9900 refs]
>>> gc.collect()
48
[9742 refs]
>>>

Take it from there, but don't forget to come for air once an hour <wink>.