Message72332
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> |
|
Date |
User |
Action |
Args |
2008-09-02 12:14:08 | pitrou | set | recipients:
+ pitrou |
2008-09-02 12:14:08 | pitrou | set | messageid: <1220357648.44.0.102035652616.issue3757@psf.upfronthosting.co.za> |
2008-09-02 12:14:04 | pitrou | link | issue3757 messages |
2008-09-02 12:14:03 | pitrou | create | |
|