A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2003-March/034215.html below:

[Python-Dev] funny leak

[Python-Dev] funny leakNeal Norwitz neal@metaslash.com
Mon, 24 Mar 2003 09:00:23 -0500
On Mon, Mar 24, 2003 at 07:51:00AM -0600, Jeff Epler wrote:
> On Mon, Mar 24, 2003 at 08:43:16AM -0500, Neal Norwitz wrote:
> > One ref may be leaked the first time gc.collect() is called with
> > garbage (23150 -> 23151).  But after that, no more refs are leaked
> > (ref count stays at 23151).
> 
> If that's true, then running the 'def' block repeatedly will leak
> references, right?  I think from Christian's original message this is
> what he meant, but I'm not sure.

I misread the original message.  Running the 'def' block does indeed
leak a reference and collect() has no effect.  Similarly:

        [23154 refs]
        >>> def conjoin(gs):
        ...     def gen():
        ...         gs      # unbreakable cycle
        ...         gen     # unless one is commented out
        ... 
        [23194 refs]
        >>> del conjoin
        [23155 refs]

Neal



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