memory leaks in perl

Rick Delaney rick-h4KjNK7Mzas at public.gmane.org
Sat May 1 18:39:45 UTC 2004


On Sat, May 01, 2004 at 02:22:47PM -0400, Tom Legrady wrote:
> Rick Delaney wrote:
> 
> >Obviously it doesn't free the key, but it does free the value.  But I'm
> >pretty sure delete($hash{$key}) will free the value too.
> > 
> >
> 
> Try 'perldoc -f undef' ....
> 
> undef EXPR
> undef Undefines the value of EXPR, which must be an lvalue. Use only
> on a scalar value, an array (using "@"), a hash (using "%"), a
> subroutine (using "&"), or a typeglob (using <*>). (Saying
> "undef $hash{$key}" will probably not do what you expect on
> most predefined variables or DBM list values, so don?t do that;
> see delete.)
> 
> etc., etc. etc.

Thanks for the rtfm, but is that supposed to confirm or refute what
I said?  It appears to do neither.  Was this thread originally about 
DBM hashes?  I missed the beginning.

-- 
Rick Delaney
rick-h4KjNK7Mzas at public.gmane.org
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list