Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: Garbage Collectionby mrmick (Curate) |
on Jan 05, 2001 at 19:27 UTC ( [id://50076]=note: print w/replies, xml ) | Need Help?? |
Here's another shot at it... Memory allocation is limited to scope(block,subroutine,package). If you have any references to an object then the object stays in memory. Once the last reference to that object is gone (out of scope or undef'd for example) then your resources are freed automatically. The data(object) is persistent only when you have something in the namespace(s) that reference.
In Section
Seekers of Perl Wisdom
|
|