in reply to scope and undef
Existance of a circular reference can cause this problem. i.e. even if you undef $self->{dbo}, there exist some reference to same object. So its not removed from memory.
Here is a very simple problematic case for circular reference.
Please check your code for any circular reference.foreach (1..5) { my $a; my $b; $a->{b} = $b; $b->{a} = $a; } # since both are pointing to each other they will never get coll +ected.
you may try disconnecting the database handle just before you undef the $self->{dbo} as an immediate fix.
Cheers !
--VC
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: scope and undef (Devel::Cycle)
by lodin (Hermit) on Aug 28, 2007 at 11:13 UTC |