[Python-Dev] reference leaks, del, and annotations (original) (raw)

Neal Norwitz nnorwitz at gmail.com
Tue Apr 4 10:01:31 CEST 2006


On 4/3/06, Michael Hudson <mwh at python.net> wrote:

Greg Ewing <greg.ewing at canterbury.ac.nz> writes:

> Michael Hudson wrote: > >> And if we want to have a version of del that can't reference >> 'self', we have it already: weakrefs with callbacks. > > Does that actually work at the moment? Last I heard, > there was some issue with gc and weakref callbacks > as well. Has that been resolved? Talk about FUD. Yes, it works, as far as I know.

Not sure if everyone is talking about the same thing. This is still a problem (at least for me): http://svn.python.org/projects/python/trunk/Lib/test/crashers/weakref_in_del.py

It creates a weakref to self in del.

There are 7 crashers, plus 5 more due to infinite recursion. :-( That doesn't include the parts of test_trace that are commented out. At least test_trace needs to be fixed prior to 2.5.

n



More information about the Python-Dev mailing list