[Python-Dev] reference leaks

Michael Hudson mwh at python.net
Fri Nov 25 09:57:00 CET 2005


Neal Norwitz <nnorwitz at gmail.com> writes:

> There are still a few reference leaks I've been able to identify.  I
> didn't see an obvious solution to these (well, I saw one obvious
> solution which crashed, so obviously I was wrong).
>
> When running regrtest with -R here are the ref leaks reported:
>
> test_codeccallbacks leaked [2, 2, 2, 2] references
> test_compiler leaked [176, 242, 202, 248] references
> test_generators leaked [254, 254, 254, 254] references
> test_tcl leaked [35, 35, 35, 35] references
> test_threading_local leaked [36, 36, 28, 36] references
> test_urllib2 leaked [-130, 70, -120, 60] references
>
> test_compiler and test_urllib2 are probably not real leaks, but data
> being cached.  I'm not really sure if test_tcl is a leak or not. 
> Since there's a lot that goes on under the covers.  I didn't see
> anything obvious in _tkinter.c.
>
> I have no idea about test_threading_local.

It's very odd, but probably not a leak.

> I'm pretty certain test_codeccallbacks and test_generators are leaks. 

Isn't test_codeccallbacks just the extra references you get from
registering an error handler?  test_generators is new, I think.

Cheers,
mwh

-- 
  Good? Bad? Strap him into the IETF-approved witch-dunking
  apparatus immediately!                        -- NTK now, 21/07/2000


More information about the Python-Dev mailing list