Mercurial > cpython-lru_cache-weakref
diff Modules/_threadmodule.c @ 56277:74b18a267cd7 3.1
Merged revisions 75125 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
................
r75125 | philip.jenvey | 2009-09-28 21:57:18 -0700 (Mon, 28 Sep 2009) | 11 lines
Recorded merge of revisions 75123 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r75123 | philip.jenvey | 2009-09-28 21:32:44 -0700 (Mon, 28 Sep 2009) | 4 lines
#6990: clear threading.local's key only after its thread state is removed:
fixes local subclasses leaving old state around after a ref cycle GC which
could be recycled by new locals
........
................
| author | Philip Jenvey <pjenvey@underboss.org> |
|---|---|
| date | Tue, 29 Sep 2009 05:03:48 +0000 |
| parents | 87fbbf22adf3 |
| children | 1e4c4b235a89 c219f7261d98 |
line wrap: on
line diff
--- a/Modules/_threadmodule.c Mon Sep 28 19:23:20 2009 +0000 +++ b/Modules/_threadmodule.c Tue Sep 29 05:03:48 2009 +0000 @@ -239,7 +239,6 @@ static int local_clear(localobject *self) { - Py_CLEAR(self->key); Py_CLEAR(self->args); Py_CLEAR(self->kw); Py_CLEAR(self->dict); @@ -261,6 +260,7 @@ PyDict_DelItem(tstate->dict, self->key); } + Py_XDECREF(self->key); local_clear(self); Py_TYPE(self)->tp_free((PyObject*)self); }
