> One more thing - maybe important. This background color problem is not 
> neccesary connected with a memory. I think that maybe the bigger problem is 
> that it rises the GDI object counter. Please compare difference between Perl8 
> and Perl10 - in Perl 5.8 in principle the memory is stable whereas in Perl10 
> it blows up.

The memory issue you are seeing in 5.10 is a perl bug (my understanding). When 
GDI handles aren't released they can use a significant amount of memory . 
> Jeremy, how you manage the beckground problem? May you scatch it?

I'm not sure the approach I use would help you as I draw the whole screen 
(fonts, graphics, backgrounds etc). I've looked at this again, and I think I've 
fixed the bug within Win32::GUI. You mentioned that you built Win32::GUI from 
scratch, so if you replace the DestroyWindow method in GUI.xs (around line 
2231) with the code below it should fix things for you...
    ########################################################################### 
   # (@)INTERNAL:DestroyWindow()BOOLDestroyWindow(...)CODE:    HWND handle;    
LPPERLWIN32GUI_USERDATA perlud;    handle = (HWND) handle_From(NOTXSCALL 
ST(0));    perlud = (LPPERLWIN32GUI_USERDATA) GetWindowLong(handle, 
GWL_USERDATA);    if(ValidUserData(perlud) ) {      //free any resources...need 
to check other things like fonts etc      if (perlud->hBackgroundBrush != NULL) 
{        DeleteObject((HGDIOBJ) perlud->hBackgroundBrush);        
perlud->hBackgroundBrush = NULL;      }    }    RETVAL = 
DestroyWindow(handle);OUTPUT:    RETVAL                                    
------------------------------------------------------------------------------
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software 
be a part of the solution? Download the Intel(R) Manageability Checker 
today! http://p.sf.net/sfu/intel-dev2devmar
_______________________________________________
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