[Patches] [ python-Patches-1444398 ] Make itertools.tee participate in GC

SourceForge.net noreply at sourceforge.net
Tue Mar 7 01:12:26 CET 2006


Patches item #1444398, was opened at 2006-03-06 21:33
Message generated for change (Comment added) made by twouters
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1444398&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Modules
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Thomas Wouters (twouters)
Assigned to: Raymond Hettinger (rhettinger)
Summary: Make itertools.tee participate in GC

Initial Comment:
A small patch to make itertools.tee objects participate
in GC; solves the memoryleak in test_generators (and
any other use of tee objects in cycles.)


----------------------------------------------------------------------

>Comment By: Thomas Wouters (twouters)
Date: 2006-03-07 01:12

Message:
Logged In: YES 
user_id=34209

Well, I'm fine with removing the scope-enclosed generator
versions of _m235() and fib() from test_generators, if
that's what you're implying. :> However, I think it's
slightly more suitable to just have tee participate in GC.


----------------------------------------------------------------------

Comment By: Raymond Hettinger (rhettinger)
Date: 2006-03-07 01:05

Message:
Logged In: YES 
user_id=80475

I will take a look at the patch soon.  IIRC, there was a 
concious decision to not have tee engage in GC because no 
normal use cases created cycles (they seem to arise only 
when intentionally creating a cycle for test code).



----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1444398&group_id=5470


More information about the Patches mailing list