[perl-win32-gui-users] memory leak problem

2009-12-23 Thread Andrey
Hello, Win32::GUI users! I have an application which extensively creates and destroys window controls, such as labels, buttons etc.. To get rid from window control I use Win32::GUI::DestroyWindow, but seems this method is not working properly, see example: == use strict; use Wi

[perl-win32-gui-users] Windows shutdown

2009-12-23 Thread Seb
Hi folks, Here is the question: I'm looking for a minimal example of a (perl) script that dies (gracefully or not) when Windows tries to shutdown. Story: I have developed an application that monitors via RS232 the health of TV screens attached to PCs. The information gathered is relayed to a ce

Re: [perl-win32-gui-users] memory leak problem

2009-12-23 Thread Jeremy White
Hi, What version of Win32::GUI are you using? I don't see any memory leak when running your code? You don't need to do anything to 'destroy' a control, Win32::GUI should do the right thing (see below). The same also applies to windows, you can create/destroy (let them go out of scope) just like

Re: [perl-win32-gui-users] Windows shutdown

2009-12-23 Thread Jeremy White
Hi, One thing that did strike me when reading your mail was when you said "application does not in itself require a GUI". When you hooked WM_QUERYENDSESSION + WM_ENDSESSION, are you sure your application is sitting on the event pump (Win32::GUI::Dialog) when windows shuts down? If it's not, the

Re: [perl-win32-gui-users] Windows shutdown

2009-12-23 Thread Seb
Hi Jeremy, | One thing that did strike me when reading your mail was when you said | "application does not in itself require a GUI". When you hooked | WM_QUERYENDSESSION + WM_ENDSESSION, are you sure your application is | sitting on the event pump (Win32::GUI::Dialog) when windows shuts down? |

Re: [perl-win32-gui-users] Windows shutdown

2009-12-23 Thread Jeremy White
Something like below - I didn't have time to test it fully, but something is printed when I shutdown. use strict; use Win32::GUI qw (WM_QUERYENDSESSION); my $main = Win32::GUI::Window->new(-name => 'Main', -text => 'Perl', -width => 200, -height => 200);$main->AddLabel(-name => "Label", -text

Re: [perl-win32-gui-users] Windows shutdown

2009-12-23 Thread Seb
Hi Jeremy, | Something like below - I didn't have time to test it fully, but | something is printed when I shutdown. | | use strict; use Win32::GUI qw (WM_QUERYENDSESSION); my $main = | Win32::GUI::Window->new(-name => 'Main', -text => 'Perl', -width => 200, | -height => 200);$main->AddLabel(-na

Re: [perl-win32-gui-users] Windows shutdown

2009-12-23 Thread Kevin Marshall
Seb, If you have ActiveState Perl, you could try running the script using the wperl.exe program instead. This runs the script without displaying a console. This means that any output won't be seen, but I tried it with the sample code that Jeremy provided and it worked OK for me. If the

Re: [perl-win32-gui-users] Windows shutdown

2009-12-23 Thread Angelos Karageorgiou
On 23/12/2009 2:19 μμ, Seb wrote: > > Hi folks, > > > Here is the question: I'm looking for a minimal example of a (perl) script > that dies (gracefully or not) when Windows tries to shutdown. > why would an END block not be sufficient enough for you ? <>-