Perl Garbage Collector
- Dear Friends,
Anybody has any idea about the Perl Garbage Collector. Give me Some
tips to know and how to implement it in programs. I hope it helps in
clearing the memory while the program is running.
>>>>> "joshypy" == joshypy <joshypy@...> writes:joshypy> Anybody has any idea about the Perl Garbage Collector. Give me Some
joshypy> tips to know and how to implement it in programs. I hope it helps in
joshypy> clearing the memory while the program is running.
Perl doesn't have a garbage collector. It uses reference counting. In
general, you won't have to worry about it, because Perl automatically reuses
any memory no longer being used by your variables. Under rare circumstances,
you can create memory structures (using self-referential references) that
might leak memory, but if you need such structures, you can use Weak
references instead and still get nearly all the functionality you need.
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!