J.Perl.Man has asked for the wisdom of the Perl Monks concerning the following question:
My question has to do with potential memory leaks, and how to properly clean up what I'm doing... I'm creating an array off of a hash as follows:
if (! exists $cTable{$cID}{raw}) { $cTable{$cID}{raw}=[]; } push @{$Table{$cID}{raw}}, $currentVal;
and, periodically wanting to delete the hash.
delete $cTable{$cID};
My question is, do I first need to do something to remove the array or is that cleaned up automatically for me?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Avoiding memory loss...
by LanX (Saint) on Dec 27, 2012 at 21:53 UTC | |
by J.Perl.Man (Novice) on Dec 27, 2012 at 22:37 UTC | |
by LanX (Saint) on Dec 27, 2012 at 23:11 UTC | |
by J.Perl.Man (Novice) on Dec 27, 2012 at 23:18 UTC | |
Re: Avoiding memory loss...
by Anonymous Monk on Dec 27, 2012 at 22:33 UTC | |
by dave_the_m (Monsignor) on Dec 27, 2012 at 23:29 UTC | |
by LanX (Saint) on Dec 27, 2012 at 23:39 UTC | |
by J.Perl.Man (Novice) on Dec 27, 2012 at 22:41 UTC | |
by LanX (Saint) on Dec 27, 2012 at 23:48 UTC |
Back to
Seekers of Perl Wisdom