in reply to Re: Re: Re: Memory usage breakup
in thread Memory usage breakup

$var = undef and undef $var behave differently in respect to memory deallocation. The first never seems to free memory, while the second does instantly. BrowserUk's code uses about 136MB on my system, while the bellow never grows past 4MB on my system. (Win98/AS809)
{ for( 1 .. 100_000 ) { $x[ $_ ] = ' ' x 1000; undef($x[ $_ ]); } <STDIN>; } <STDIN>;

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: Memory usage breakup
by BrowserUk (Patriarch) on May 01, 2004 at 15:45 UTC

    Indeed++. I get the same results here.


    Examine what is said, not who speaks.
    "Efficiency is intelligent laziness." -David Dunham
    "Think for yourself!" - Abigail