Python 2.0

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


[Graham Matthews]
> a) don't call finalisers for circularly referenced collected objects.
>    Instead just collect their memory. This is not perfect but better
>    than current Python which doesn't run finalisers on circularly
>    referenced objects nor collect their memory.
Tim Peters (tim_one at email.msn.com) wrote:
: Solve the problem by ignoring it?  Guido would find that more attractive
: than I would <wink>.

Even if you do this you still end up in a better situation than current
Python, since you can at least reclaim the memory of circularly reffed
objects. Moreover for builtin objects (like files) you can do better
and also reclaim their resources. So it is not perfect but still an
improvement on current Python.

[Graham Matthews]
> b) better still use a two pass collector. If you don't know what that is
>    just think about what you need to do (or not do) in pass 1 to ensure
>    that all the objects needed for a __del__ method to execute in a known
>    environment are there. <wink>
Tim Peters (tim_one at email.msn.com) wrote:
: Java does this.  Start the thread from its beginning again <0.5 wink>.
: 
I am sure you can come up with something better than this Tim! <wink>

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