On 3/27/06, Raymond Hettinger <raymond.hettinger at verizon.net> wrote: > > > Modified: > > python/trunk/Modules/itertoolsmodule.c > > Log: > > > > Make itertools.tee and its internal teedataobject participate in GC. > This > > alone does not solve the leak in test_generators, unfortunately, but it > is > > part of test_generators' problem and it does solve other cycles. > > Thanks for getting this in. > > To get the leak in test_generators, I think you make need to add GC to the > teeobject as well as the teedataobject. The teeobject has GC (hence the word 'and' in 'itertools.tee and its internal teedataobject' ;-) The problem with test_generators is that this also leaks: def leak(): def gen(): while True: yield g g = gen() leak() It doesn't leak in 2.4. I'm using a little shell script to work backwards through the 2.5 changes to find out which one introduced this, although I somehow suspect it's the coroutine stuff... ;P -- Thomas Wouters <thomas at python.org> Hi! I'm a .signature virus! copy me into your .signature file to help me spread! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/python-dev/attachments/20060327/20b24644/attachment.html
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4