develooper Front page | perl.perl6.language | Postings from February 2001

Re: Garbage collection (was Re: JWZ on s/Java/Perl/)

Thread Previous | Thread Next
From:
Sam Tregar
Date:
February 11, 2001 20:41
Subject:
Re: Garbage collection (was Re: JWZ on s/Java/Perl/)
Message ID:
Pine.LNX.4.30.0102112327270.3700-100000@localhost.localdomain
On Sun, 11 Feb 2001, Jan Dubois wrote:

> However, I couldn't solve the problem of "deterministic destruction
> behavior": Currently Perl will call DESTROY on any object as soon as the
> last reference to it goes out of scope.  This becomes important if the
> object own scarce external resources (e.g. file handles or database
> connections) that are only freed during DESTROY.  Postponing DESTROY until
> an indeterminate time in the future can lead to program failures due to
> resource exhaustion.

Well put.  Can we finally admit that if we want Perl to DWIM with respect
to DESTROY that we need to keep counting references?  I certainly hope so.
I think this research project has gone on long enough.  If Larry comes
back and says that DESTROYs can be called in a non-deterministic fashion
I'll be very surprised and we can certainly revive the GC debate then.
Until then I think we might as well accept that ref-counting is here to
stay.

Speaking of which, do any of the high priests know when Larry might come
down off the mountain?  Any day now the true believers are going to melt
down their copies of Camel III and cast themselves a golden Python.

-sam



Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About