[Israel.pm] Garbage Collection Question
margol at beamartyr.net
Sat May 8 12:19:51 PDT 2004
Even if the GC does collect it AFAIK it will not release the memory back to
the system until Perl exits - rather it will save the memory for other
variables (or anything else in the Perl process which wants it). Maybe I'm
remembering wrong, though...
----- Original Message -----
From: "Shlomo Yona" <shlomo at cs.haifa.ac.il>
To: "Perl in Israel" <perl at perl.org.il>
Sent: Saturday, May 08, 2004 5:40 PM
Subject: Re: [Israel.pm] Garbage Collection Question
> On Sat, 8 May 2004, Yuval Yaari wrote:
> > Will Perl automagically get rid of $file after the last line I used it
> > (in case reference count == 0, of course), or would it be better to set
> > to undef?
> Depending on the scope of $file.
> If $file is still in scope, then Perl's garbage collector will not touch
> That is because there is no count 0 for that chunk of
> Setting the scalar to under fill, however, be useful in some
> implementations of Perl, as it will set the reference count
> to 0.
> Shlomo Yona
> shlomo at cs.haifa.ac.il
> Perl mailing list
> Perl at perl.org.il
More information about the Perl