|
From: Andrey <wa...@ma...> - 2009-12-24 08:44:23
|
Memory leak cannot be normal for any program. So, it is either Perl bug or Win32::GUI bug
But I noticed that same example using Perl/Tk does not cause memory leak.
===================
use strict;
use Tk;
my $w = MainWindow->new;
my $b = $w->Button(-text => 'test', -command => \&click)->pack();
MainLoop;
sub click
{
for (1..10000)
{
$b->destroy;
$b = $w->Button(-text => rand(), -command => \&click)->pack();
}
}
===================
-----Original Message-----
From: "Kinch" <ki...@ne...>
To: "'perl-win32-gui-users'" <per...@li...>
Date: Thu, 24 Dec 2009 18:28:03 +1000
Subject: Re: [perl-win32-gui-users] memory leak problem
> Without knowing much about perl or it's internals, isn't this behaviour
> normal for perl, especially on windows? I was told that when perl variables
> are "freed", the perl interpreter keeps the memory malloc'ed in a pool to
> use again for any new perl variables or data structures it needs.
>
|