I think there may be confusion about what constitutes a "memory leak". A memory leak occurs if memory is not freed at the point the last reference to that memory goes away. There are 3 ways to get a memory leak in a perl program: construct a circular reference (as described by other comments above); find and tickle a bug in perl's reference counting; or find and tickle a bug in some other external non-perl code (such as an XS library).
It is possible to write a program that consumes more memory than it needs to because it keeps unnecessary references to data, thus making the memory unavailable for reclamation. But that is simply an inefficiency in the program (often fixable by more carefully restricting the scope of variables), not a memory leak.
Hugo
In reply to Re: Memory leaks and reference counting within Perl.
by hv
in thread Memory leaks and reference counting within Perl.
by DigitalKitty
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |