Hello, Jeremy!
In my main application I'm forced to have several controls with same name,
because the UI is actually loads from network upon some sort of
action. So the names are like Button001, Button002, ...etc. And when new UI
arrives I need to get rid from all existing controls (i.e.
Butt
Hi,
The reason you are seeing strange behavior is that you have several controls
with the same name, give each one a unique name and the problem will go away.
For me (Vista, Perl 5.8.9, Win32::GUI 1.6) the below doesn't leak (handle or
memory [i do see a 'leak' of 16K on the first run, but no m
On 12/23/2009 07:19 AM, Seb wrote:
How about running your script as a Windows Service? If you need, I'll
dig up an example for you.
As a service, you can't have a GUI, but it can communicate over a network.
Brian
> Hi folks,
>
>
> Here is the question: I'm looking for a minimal example of a (pe
Well, in my main application I need dynamically destroy/create controls. But I
was told to not use DestroyWindow, because Win32::GUI "correctly" destroys
control when it goes out of scope. I decided to check how Win32::GUI destroys
controls when they are out of scope and wrote an example below.
Probably because the control named "Label" is alredy defined in main code. Why
do you try to create it once more?
You should just modify its properties (text), something like this:
$main->Label->Text(rand());
-Original Message-
From: Andrey [mailto:war...@mail.ru]
Sent: Thursday, Dece
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"
Ilya BANDORIN wrote:
> Since you're in Windows, nobody cares about that #!path/to/perl. :)
> If you wish wperl.exe to process your scripts instead of perl.exe, associate
> .pl file extension with wperl.exe. That's all.
> But I think that's not good because if you do it all your scripts will be
>
Hi Seb,
Since you're in Windows, nobody cares about that #!path/to/perl. :)
If you wish wperl.exe to process your scripts instead of perl.exe, associate
.pl file extension with wperl.exe. That's all.
But I think that's not good because if you do it all your scripts will be
launched with no conso
Hi Kevin,
| 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.
It
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();
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.
-Orig
Hello Jeremy! I tried your code (with commented lines) and memory leak still
exists
I tried it under WinXP SP2 and SP3
Perl version: 5.10.0
Win32::GUI version: 1.06
Here is stats for working set and private bytes for script:
1. after start: WS: 1276K, PB: 3668K, Handles: 25
2. first hit on label
12 matches
Mail list logo