I'm currently writing a docklet and as part of my configuration dialog I am attempting to load an image to a static picture control but I noticed there was a memory leak.
Anyway to cut a long story short, I cut all the code down to the bare minimum and isolated the leak to the call to DockletLoadGDIPlusImage - now all I have in the method call I am making is the following:
void LoadImageIDC_CLOCK(DOCKLET_DATA *lpData, HWND hDlg)
{
Bitmap *bmpHandle = DockletLoadGDIPlusImage(lpData->szImage);
DeleteObject(bmpHandle);
}
If i comment those 2 lines of code out there is no memory leak.
Can you confirm this is a leak in that call and if there is a fix for it?