Hi all,
Does anyone know how to empty a hash and reclaim the memory, without exiting the script?
I've got a script that loads a 390meg gene list into memory, then when I'm done with it I want to empty the hash so that I can reclaim the memory and move onto the next memory-intensive op. I've tried:
undef %hash;
and also:
%hash = ();
I found undef %hash actually empties the hash (trying to parse it shows it's empty), yet when I monitor the script with 'top' in *nix I see it is still claiming 390megs.
Any ideas?
TIA,
Ben
Does anyone know how to empty a hash and reclaim the memory, without exiting the script?
I've got a script that loads a 390meg gene list into memory, then when I'm done with it I want to empty the hash so that I can reclaim the memory and move onto the next memory-intensive op. I've tried:
undef %hash;
and also:
%hash = ();
I found undef %hash actually empties the hash (trying to parse it shows it's empty), yet when I monitor the script with 'top' in *nix I see it is still claiming 390megs.
Any ideas?
TIA,
Ben