[Python-Dev] refleaks in 2.4

Michael Hudson mwh at python.net
Sat Apr 1 15:54:25 CEST 2006


Armin Rigo <arigo at tunes.org> writes:

> Hi Neal,
>
> On Sun, Mar 26, 2006 at 11:39:50PM -0800, Neal Norwitz wrote:
>> test_pkg leaked [10, 10, 10] references
>
> This one at least appears to be caused by dummy (deleted) entries in the
> dictionary of interned strings.  So it is not really a leak. 

It's actually because somewhere in the bowels of compilation, the file
name being compiled gets interned and test_pkg writes out some
temporary files and imports them.  If this doesn't happen on the
trunk, did this feature get lost somewhere?

> It is a pain that it is so hard to figure this out, though.
> Wouldn't it make sense to find a trick to exclude these dummy
> entries from the total reference count?  E.g. by subtracting the
> refcount of the dummy object...

Something like that would be nice, yes...

Cheers,
mwh

-- 
  GET   *BONK*
  BACK  *BONK*
  IN    *BONK*
  THERE *BONK*             -- Naich using the troll hammer in cam.misc


More information about the Python-Dev mailing list