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:
John Porter
Date:
February 14, 2001 09:54
Subject:
Re: Garbage collection (was Re: JWZ on s/Java/Perl/)
Message ID:
20010214125410.A17425@min.net
Branden wrote:
> John Porter wrote:
> > > ...and trigger a GC that will get rid of the arg.
> >
> > No.  Perl decides for itself when to do GC.
> 
> The idea is to *allow* a programmer to explicitly destroy an object, for
> better (and sooner) resource disposal. The programmer wouldn't have to do it
> (and wouldn't do it most the time), but if he knows he uses many resources
> and he would like to be nice, he *could* do it (not meaning he would have to
> do it either...).

Obviously "freeing" an object marks it as GC'able.
It should *NOT* "trigger" a GC.
If the user wants to explicitly cause GC (and the language
allows), then she can put that in too.
Freeing should NOT trigger a GC; although of course it's
a logical point at which perl may decide to do a GC anyway.

-- 
John Porter


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