Aaron <> wrote:
A> I've looked on deja a little but couldn't find a definite answer. I
A> created an array of hashes to store a lot of data. I have everything
A> declared as locally as possible with MYs but I'm still taking up too
A> much memory.
A> Here's a shorted version of my code:
A> foreach $key (sort { $top10talkTemp{$b} <=> $top10talkTemp{$a} }
A> keys(%top10talkTemp)) {
A> foreach (@{$source{$key}}) {
A> #Stuff in here
A> }
A> @{$source{$key}} = undef;
A> }
A> The @{%hash} is new to me. Is setting @{$source{$key}} = undef the
A> best way to clear the memory space, or can I do @{%source} = undef
A> after the foreach loop? Or is there even a better method?
Have you read:
$ perldoc -q memory
Regards,
Nicholas
--
"Why shouldn't I top-post?"
http://www.aglami.com/tpfaq.html
"Meanings are another story."
http://www.ifas.org/wa/glossolalia.html