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...@netspace.net.au>
To: "'perl-win32-gui-users'" <perl-win32-gui-users@lists.sourceforge.net>
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.
> 

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Perl-Win32-GUI-Users mailing list
Perl-Win32-GUI-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
http://perl-win32-gui.sourceforge.net/

Reply via email to