in reply to Re: Release memory in hash of hashes
in thread Release memory in hash of hashes
You can undef %hash which will reduce it's reference count by one
If "it" refers to the hash %hash, you're wrong.
%hash = (); empties the buckets, reducing the reference counts of all elements by one.
undef %hash; empties and frees the buckets, reducing the reference counts of all elements by one.
However, neither lowers the reference count of %hash. (They could lower the reference count indirectly if you had something like $hash{ele} = \%hash;, but that's not what you said.)
The later is usually overkill.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Release memory in hash of hashes
by BioLion (Curate) on Aug 17, 2009 at 16:26 UTC |