Issue3757
Created on 2008-09-02 12:14 by pitrou, last changed 2008-09-02 12:14 by pitrou.
|
msg72332 - (view) |
Author: Antoine Pitrou (pitrou) |
Date: 2008-09-02 12:14 |
|
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:04 | pitrou | create | |
|