SUGGESTED FIX
Name: ssR10077 Date: 09/26/2002
*** /export3/ssi/mantis/webrev/src/windows/native/sun/windows/ShellFolder.cpp- Thu Sep
26 13:50:54 2002
--- ShellFolder.cpp Thu Sep 26 13:41:12 2002
***************
*** 738,743 ****
--- 738,750 ----
jintArray iconBits = env->NewIntArray(nBits);
// Copy values to java array
env->SetIntArrayRegion(iconBits, 0, nBits, colorBits);
+ // Fix 4745575 GDI Resource Leak
+ // MSDN
+ // GetIconInfo creates bitmaps for the hbmMask and hbmColor members of ICONINFO.
+ // The calling application must manage these bitmaps and delete them when they
+ // are no longer necessary.
+ ::DeleteObject(iconInfo.hbmColor);
+ ::DeleteObject(iconInfo.hbmMask);
return iconBits;
}
***************
*** 804,809 ****
--- 811,819 ----
jintArray bits = env->NewIntArray(numPixels);
// Copy values to java array
env->SetIntArrayRegion(bits, 0, numPixels, colorBits);
+ // Fix 4745575 GDI Resource Leak
+ ::DeleteObject(hBitmap);
+ ::FreeLibrary(libComCtl32);
return bits;
}
*** /export3/ssi/mantis/webrev/src/windows/native/sun/windows/awt_Dialog.cpp- Thu Sep
26 13:50:55 2002
--- awt_Dialog.cpp Thu Sep 26 13:35:38 2002
***************
*** 39,44 ****
--- 39,51 ----
if (m_modalWnd != NULL) {
WmEndModal();
}
+ // Fix 4745575 GDI Resource Leak
+ // MSDN
+ // Before a window is destroyed (that is, before it returns from processing
+ // the WM_NCDESTROY message), an application must remove all entries it has
+ // added to the property list. The application must use the RemoveProp function
+ // to remove the entries.
+ ::RemoveProp(GetHWnd(), ModalDisableProp);
}
const char* AwtDialog::GetClassName() {
======================================================================
|