i am running: perl 5.8.6
  Locally applied patches:
        ActivePerl Build 811
        21540 Fix backward-compatibility issues in if.pm
        23565 Wrong MANIFEST.SKIP
  Built under MSWin32
  Compiled at Dec 13 2004 09:52:01
Win32-GUI                [1.0]
Win32-GuiTest         [1.50.4]

updated to
Win32-GUI                [1.3]
problem seem to occur less, but when i run winspy++ and spy the PerlWin32Gui_STD class, the keys that i hide (from script below) are still there and memory usage is very high. Is there a way for me to force the destruction of those object in perl and memory?

i probably won't be able to provide example for this problem; but what my script does is: discover options from a win32 class #32770 dialog, then create checkbox/buttons/etc... on a PerlWin32GUI_STD testconsole, then loops and set each option as selected on testconsole (having figure out how to do for all option yet, since Windows handle id for all object changes after re-open, btw anyone have ideas on how to keep handle id same ???), then a rediscover option that hides(trying to destroy) all objects on testconsole and discover option of other tabs (or same tab) from class #32770 dialog and the process repeats...


There may be a bug. If you run the code below, it leaks memory - but it shouldn't. On the plus side it is releasing windows handles and resources. The destruction of objects *should* happen automatically as they go out of scope. Another strange thing I noticed with this example, when running, it takes up about 50% of CPU, with explorer.exe taking up the rest - very odd?

use strict;
use Win32::GUI;

my ($W,$but);
while (1) {
 $W = new Win32::GUI::Window(
     -name => "TestWindow",
     -pos  => [  0,   0],
     -size => [210, 200],
     -text => "TestWindow",
 );
 $but=$W->AddButton(
   #-name               => "test",
   -text                => "Button 1",
   -size                => [ 70, 22 ],
   -pos         => [ 20, 20 ],
   );
}



Reply via email to