While researching memory leak in Win32::GUI I found out strange behavior of control.
Here is an example: ===================== use strict; use Win32::GUI(); my $main = Win32::GUI::Window->new(-name => 'Main', -text => 'Perl', -width => 200, -height => 200); $main->AddLabel(-name => "Label", -text => "Hello, world", -left => 20, -top => 20, -notify => 1); sub Label_Click { { # "visibility" block $main->AddLabel(-name => "Label", -text => rand(), -left => 20, -top => 20, -notify => 1); $main->AddLabel(-name => "Label", -text => rand(), -left => 20, -top => 20, -notify => 1); } $main->AddLabel(-name => "Label", -text => rand(), -left => 20, -top => 20, -notify => 1); } $main->Show(); Win32::GUI::Dialog(); sub Main_Terminate { -1; } ======================= When you click on "Hello, world" label it just disappears. If you comment any of "$main->AddLabel" lines then everything will be OK. Why label disappears? Perl version: 5.10.1 build 1006 Win32::GUI version: 1.06 ------------------------------------------------------------------------------ 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/