garbage collection / cyclic references

andrew cooke andrew at
Sat Mar 21 15:53:59 CET 2009

andrew cooke wrote:
> Aaron Brady wrote:
>> On Mar 21, 7:54 am, "andrew cooke" <and... at> wrote:
>>> they should not be used to do things like flushing and closing
>>> files, for example.
>> What is your basis for this claim, if it's not the mere unreliability
>> of finalization?  IOW, are you not merely begging the question?
> I'm not sure it's clear, but I was talking about Java.

crap.  i meant to say INdeterministic.

sorry, i am in a foul mood (for completely unrelated reasons) and probably
shouldn't be making posts to a public newsgroup.


> As Paul implied, a consequence of completely automated garbage management
> is that it is (from a programmer's POV) deterministic.  So it's a
> programming error to rely on the finalizer to free resources that don't
> follow that model (ie any resource that's anything other that reasonable
> amounts of memory).
> That's pretty much an unavoidable consequence of fully automated garbage
> collection.  You can pretend it's not, and try using finalizers for other
> work if you want.  That's fine - it's your code, not mine.  I'm just
> explaining how life is.
> Andrew

More information about the Python-list mailing list