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

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

Thread Previous
From:
Branden
Date:
February 14, 2001 07:50
Subject:
Re: Garbage collection (was Re: JWZ on s/Java/Perl/)
Message ID:
OE35vAauNjVuMhvqgSt00007457@hotmail.com
David Mitchell wrote:
> James Mastros <james@rtweb.net> wrote:
> > [snip about DESTORY predictablity not being neccessary]
> > You're probably right about that, Branden.  Quite nice, but not
neccessary.
> Hmm, I'd have to say that predictability is very, *very* nice,
> and we shouldnt ditch it unless we *really* have to.
>

I guess we really have to, unless we keep ref-counting (but that would have
circular references, so...).


> [ lots of examples of freeing up database connections, locked files etc,
> not included here because it would involve too much typing.... :-) ]
>

With something to call DESTROY explicitly, you could call it where you
*need* to free the resources as soon as possible. And a case where you don't
know (or remember) to do it, it would be done for you by the GC when it
finally collects the object.

You know, better late than never...

- Branden


Thread Previous


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