in reply to Re^2: Subroutine Memory Leak
in thread Subroutine Memory Leak

The following changes will help:
my $var = "Subroutine Memory Leak"; $mw->Label( -textvariable => \$var )->pack; sub autorefresh { # $var = $var + 20; $var += 20; return; }

Don't create a label each time in sub autorefresh. You create a new label each time the sub is executed, but the previous one is still there. You are placing a label over a label over a label over a label...

--shmem

update: tested. Memory stays dead on at 7456/5064 VIRT/RES on my system.

_($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                              /\_¯/(q    /
----------------------------  \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}