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:
Thomas Wouters 2006-04-15 22:33:13 +00:00
parent c6e55068ca
commit b3deb94dc6
2 changed files with 7 additions and 17 deletions

View file

@ -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;
}