in reply to Improving memory performance

Also beware of circular references. A variable that refers to itself or a set or
variables that create a closed loop of references can be a memory leak.

What not to do:

{ my ($x,$y); $x = \$y; # These will last until exit $y = \$x; } { my $x; $x = \$x; # This will last also }

Replies are listed 'Best First'.
Re: Re: Improving memory performance
by Sihal (Pilgrim) on Oct 07, 2002 at 11:48 UTC
    I've also had problems with a script using $sth->fetchrowhashref (DBI). Didn't clean correctly so at each iteration swallowed up a little chunk of memory.
    I think there is a method that allows you to clean up though