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

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

Thread Previous
February 14, 2001 07:50
Re: Garbage collection (was Re: JWZ on s/Java/Perl/)
Message ID:
David Mitchell wrote:
> James Mastros <> wrote:
> > [snip about DESTORY predictablity not being neccessary]
> > You're probably right about that, Branden.  Quite nice, but not
> 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 Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About