fork()

Graham Matthews graham at sloth.math.uga.edu
Fri Jun 11 04:58:10 CEST 1999


Guido van Rossum (guido at cnri.reston.va.us) wrote:
: Of course finalizers are still screwed, since if an instance is
: involved in a cycle, I may have zapped its instance variables before
: calling its __del__.  (To break the cycles, the collector would call
: the clear() method of all unmarked dicts, which would break the
: cycles, and then the ref counting would free the depending objects.)

This is why I suggested two pass collection. Don't zap things in pass
one. Zapping things is exactly what removes the context in which __del__
methods can run predictably and without error. Do the zapping in pass
2.

graham
-- 
              Where do you think you're going
              Don't you know it's dark outside
              Where do you think you're going
              Don't you care about my pride




More information about the Python-list mailing list