<br><div><span class="gmail_quote">On 4/1/06, <b class="gmail_sendername">Nick Coghlan</b> &lt;<a href="mailto:ncoghlan@gmail.com">ncoghlan@gmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Greg Ewing wrote:<br>&gt; I find it rather worrying that there could be a<br>&gt; few rare cases in which my generators cause<br>&gt; memory leaks, through no fault of my own and<br>&gt; without my being able to do anything about it.
<br><br>The GC changes PJE is looking at are to make sure you *can* do something about<br>it. If the generator hasn't been started, or has already finished, then the GC<br>won't consider it as needing finalisation.</blockquote>
<div><br>Actually, if a generator has already finished, it no longer holds a suspended frame alive, and there is no cycle (at least not through the generator.) That's why test_generators no longer leaks; explicitly closing the generator breaks the cycle. So the only thing fixing GC would add is cleaning up cycles where a created but not started generator is the only thing keeping the cycle alive.
</div></div><br>-- <br>Thomas Wouters &lt;<a href="mailto:thomas@python.org">thomas@python.org</a>&gt;<br><br>Hi! I'm a .signature virus! copy me into your .signature file to help me spread!

AltStyle によって変換されたページ (->オリジナル) /