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.
In reply to Re^2: Release memory in hash of hashes
by ikegami
in thread Release memory in hash of hashes
by vit
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |