Strict - yes, all the time
warning - most of the time :)

I think I have tracked the leak down to the window_paint routine, and specifically to the DIBitmap routine AlphaCopyToDC(). I need to do some more fixed tests, but to me it looks like a problem with Alpha channels in DIBitmap structures, or maybe just DIBitmap structures loaded from PNG files.... or both :)

In window_paint, I call AlphaCopyToDC() to paint a solid image into the $memDC (no memory leak), but when I use the same routine to paint a load of smaller images that contain transparency layers via AlphaCopyToDC() into the $memDC, the memory leak starts appearing. If I comment out just this one call from the foreach loop (and leave everything else running), the leak doesnt happen.

- Active Perl 5.8.6
- Win32-GUI-DIBitmap [0.15]

Need to find some transparent images to use as background image, and see if the leak starts again.

Steve

Emmanuel E wrote:
are you already using use strict? if not use it and cleanup every warning.

threads generally have all kinds of memory problems so if ur using threads life becomes very difficult.

Steve Loughran wrote:
Hi all

Not strictly a win32-gui related question. How would I go about tracking down my memory usage in a perl script? I have a small memory leak in my code somewhere, but no idea where to start looking for clues.

Anyone got any pointers or tips?

Steve

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
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/



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
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/


Reply via email to