Hello List!
I have a quick question about memory release in perl:

{
    my @array;

    foreach my $n (1..1e7 ) {
        push @array, $n;
        print "$n\n";
    }
}

print "sleeping\n";
sleep 600;

after the code block, I epxect memory usage to drop to almost zero
because @array went out of scope. but when I do top after it executes
after the code block it still has huge memory usage..

Could anyone give me some explanation?

Thanks!
Jim


-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to