This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients pitrou
Date 2008-09-02.12:14:03
SpamBayes Score 3.7117523e-05
Marked as misclassified No
Message-id <1220357648.44.0.102035652616.issue3757@psf.upfronthosting.co.za>
In-reply-to
Content
tp_traverse and tp_clear on threading.local are defined, but the
Py_TPFLAGS_HAVE_GC flag is not set. As a result, cycles are not collected:

>>> import threading, weakref
>>> o = threading.local()
>>> class X(object): pass
... 
>>> x = X()
>>> x.o = o
>>> o.x = x
>>> wr = weakref.ref(x)
>>> del x, o
>>> import gc
>>> gc.collect()
0
>>> wr()
<__main__.X object at 0x9bb0dc4>
History
Date User Action Args
2008-09-02 12:14:08pitrousetrecipients: + pitrou
2008-09-02 12:14:08pitrousetmessageid: <1220357648.44.0.102035652616.issue3757@psf.upfronthosting.co.za>
2008-09-02 12:14:04pitroulinkissue3757 messages
2008-09-02 12:14:03pitroucreate