mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
Add missing PyObject_GC_Track call, causing *some* itertools.tee objects to
not be tracked by GC. This fixes 254 of test_generators' refleaks on my machine, but I'm sure something else will make them come back :> Not adding a separate test for this kind of cycle, since the existing fib/m235 already test them in more extensive ways than any 'minimal' test has been able to manage.
This commit is contained in:
parent
c6e55068ca
commit
b3deb94dc6
2 changed files with 7 additions and 17 deletions
|
|
@ -498,6 +498,7 @@ tee_copy(teeobject *to)
|
|||
newto->dataobj = to->dataobj;
|
||||
newto->index = to->index;
|
||||
newto->weakreflist = NULL;
|
||||
PyObject_GC_Track(newto);
|
||||
return (PyObject *)newto;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue