Wiggins d'Anconia wrote:

JupiterHost.Net wrote:

I just had a discussion about variables going out of scope (for memory
considerations)

The idea was presented that variables go out of scope as soon they're
last referenced in a block, I always thought it was when the block ended.



When a var goes out of scope and when the memory is available to perl
again are two different things, and when the memory is available to perl
again and when the memory is available on the system are two different
things (at least on Unix systems). A variable can be reclaimed by the
garbage collector as soon as there is no potential for it to be
referenced elsewhere in the application. When the garbage collector will
actually get to it is another question. And regardless, the memory will
still be available to the same process, so it will not be available to
other programs for instance until the program has ended.

HTH,


Yes it does help quite a bit :) thanks wiggins!

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to