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

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

Thread Previous | Thread Next
Sam Tregar
February 11, 2001 20:41
Re: Garbage collection (was Re: JWZ on s/Java/Perl/)
Message ID:
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

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.


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About