in reply to Re^2: Memory leaks and circular references
in thread Memory leaks and circular references
Changing the main code to
package main; use strict; use warnings 'all'; use Devel::Cycle; for( 1...1_000_000 ) { print "\r$_/1000000"; my $top = Top->new(); my $bottom = $top->{bottom} or die "NO BOTTOM!"; $top = $bottom->{top} or die "NO TOP!"; find_cycle( $top ); find_cycle( $bottom ); }
the memory usage on my box remains steady at 2476 kB, so your memory leak has to be somewhere else. Your code as posted is fine so far.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Memory leaks and circular references
by jdrago_999 (Hermit) on Sep 07, 2008 at 00:56 UTC | |
by jdrago_999 (Hermit) on Sep 07, 2008 at 01:05 UTC | |
by Joost (Canon) on Sep 07, 2008 at 01:36 UTC |