What does this do for you? Does it leak in this case?
use Tk; use strict; my $var = 20; my $mw = MainWindow->new(); $mw->geometry("240x200"); my $leaking_label = $mw->Label( -textvariable => \$var, -font => q{arial 14 bold} )->place( -x => 100, -y => +50, -anchor => q{nw} ) ->pack; &startloop( \$var ); MainLoop; sub startloop { my ($v) = @_; my $iid; $iid = $mw->repeat( 1500, sub { autorefresh($v) } ); return; } sub autorefresh { my ($v) = @_; $$v += 20; }
HTH.
In reply to Re: Subroutine Memory Leak
by atcroft
in thread Subroutine Memory Leak
by gopika77
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |