1.Approach
%hash=() assign empty hash
Question: will the GC recognize this and free the memory ?
2. Approach (is this necessary ?)
foreach $key (keys %hash) { delete ( $hash {$key} ); }
This works but is longer.
So what is the recommended approach ?
Thanks for the wisdom
netoli
In reply to Garbage Collection on Hash delete by netoli
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |