Python 2.0

Graham Matthews graham at sloth.math.uga.edu
Thu Jun 10 17:08:40 CEST 1999


Blake Winton (bwinton at tor.dhs.org) wrote:
: Ref counting with GC sounds to me like a good idea for Python 2.0, as it
: will eliminate a class of memory leaks that Python can currently fall
: prey to.  As long as you don't move stuff around in memory, and only
: collect things where all the refcounts are accounted for, and can't be
: reached, you should be safe.  Granted, this means that the people
: writing the extensions will have to be careful to INCREF/DECREF where
: they're supposed to, but I don't see that as a bad thing since they
: should already be careful about that sort of stuff.

Actually Blake I have a feeling that I have read a paper somewhere that
says that a mark sweep collector with refcounts can in fact patch up
refcount errors, so it won't be so critical that extension writers get
their INCREF/DECREFs just right. I am not 100% sure of this but at least
on the surface it seems plausible (even if it can only give a warning
about such errors). Anyone know more about this?
graham

-- 
           As you grow up and leave the playground
       where you kissed your prince and found your frog
          Remember the jester that showed you tears
                   the script for tears




More information about the Python-list mailing list