All,
I've been working with Jez to add a ClassData() method to Win32::GUI, to
give us somewhere to store class instance data, without having to push
it into the blessed object. I just committed an implementation of what
was discussed previously on the list (I'd add a url to the message, but
the SF mail archives are down at the moment).
Whilst doing so we identified a source of memory leaks that I have also
corrected accross the codebase - the worst of which would only have been
seen by someone creating and destroying a lot of windows (as we were
leaving an empty HV around during window destruction ~50 bytes per window).
We were hoping to close down this bug report too:
https://sourceforge.net/tracker/index.php?func=detail&aid=1417288&group_id=16572&atid=116572
But I can't duplicate the memory leak reported (perl 5.8.7 813,
Win32::GUI 1.03, win98 and win2k). Jez reports this as still happening
on WinXP - can anyone else duplicate a memory leak running this code:
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 ],
);
}
Thanks for your help.
Rob.
--
Robert May
Win32::GUI, a perl extension for native Win32 applications
http://perl-win32-gui.sourceforge.net/