Fix menu leaks in explorer

svn path=/trunk/; revision=34284
This commit is contained in:
Jeffrey Morlan 2008-07-03 15:58:37 +00:00
parent 9865603d81
commit 32111e8715
4 changed files with 9 additions and 0 deletions

View file

@ -656,6 +656,7 @@ HRESULT DesktopShellView::DoDesktopContextMenu(int x, int y)
}
} else
_cm_ifs.reset();
DestroyMenu(hmenu);
}
pcm->Release();

View file

@ -855,6 +855,8 @@ PopupMenu::PopupMenu(UINT nid)
{
HMENU hMenu = LoadMenu(g_Globals._hInstance, MAKEINTRESOURCE(nid));
_hmenu = GetSubMenu(hMenu, 0);
RemoveMenu(hMenu, 0, MF_BYPOSITION);
DestroyMenu(hMenu);
}

View file

@ -566,6 +566,7 @@ HRESULT ShellFolderContextMenu(IShellFolder* shell_folder, HWND hwndParent, int
}
} else
cm_ifs.reset();
DestroyMenu(hmenu);
}
pcm->Release();

View file

@ -663,6 +663,11 @@ struct PopupMenu
{
}
~PopupMenu()
{
DestroyMenu(_hmenu);
}
PopupMenu(UINT nid);
operator HMENU() {return _hmenu;}