mirror of
https://github.com/python/cpython.git
synced 2025-12-09 18:48:05 +00:00
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
........
................
This commit is contained in:
parent
576fbbde56
commit
962b05c3a9
3 changed files with 43 additions and 1 deletions
|
|
@ -239,7 +239,6 @@ local_traverse(localobject *self, visitproc visit, void *arg)
|
|||
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 @@ local_dealloc(localobject *self)
|
|||
PyDict_DelItem(tstate->dict, self->key);
|
||||
}
|
||||
|
||||
Py_XDECREF(self->key);
|
||||
local_clear(self);
|
||||
Py_TYPE(self)->tp_free((PyObject*)self);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue