[Christian Tismer] > No, this is not the point. Don't call the function > at all, just execute the above code and call > gc.collect(). You will see one reference eaten > every time you repeat this. Can you show explicit evidence instead of trying to describe it? Here's what I tried: def one(): def conjoin(gs): def gen(): gs # unbreakable cycle gen # unless one is commented out import sys, gc lastrc = 0 while 1: one() gc.collect() thisrc = sys.gettotalrefcount() print thisrc - lastrc, lastrc = thisrc Running that program under a debug-build CVS Python shows no growth in sys.gettotalrefcount() after the first two iterations. It also displays no process-size growth. IOW, I see no evidence of any flavor of leak. I don't claim that you don't, but I don't know what "just execute the above code ... one reference eaten every time" *means*. It can't mean executing the specific program I pasted in above, because that simply doesn't eat a reference each time.
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