in reply to Devel::Size with Tk
I was convinced that Tk leaked like a sieve and then I heard that Perl created circular references that prevent subroutines from being garbage collected. This prompted me to rework my Tk applications so that I didn't use convenient closures but instead reused (more complicated) static subroutines. This got rid of all my leaks.
So, for example, I switched from using
to using-command => sub { MyRefresh($row,"force") },
-command => [ \&MyButton, "refresh",$row,"force" ],
This memory leak problem was identified a long time ago so I think it is fixed in Perl v5.8, but I haven't verified that. I know it isn't fixed in Perl v5.6.
- tye
|
|---|