Author: jmorlan
Date: Thu Jul 3 10:58:37 2008
New Revision: 34284
URL:
http://svn.reactos.org/svn/reactos?rev=34284&view=rev
Log:
Fix menu leaks in explorer
Modified:
trunk/reactos/base/shell/explorer/desktop/desktop.cpp
trunk/reactos/base/shell/explorer/explorer.cpp
trunk/reactos/base/shell/explorer/utility/shellclasses.cpp
trunk/reactos/base/shell/explorer/utility/utility.h
Modified: trunk/reactos/base/shell/explorer/desktop/desktop.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/deskto…
==============================================================================
--- trunk/reactos/base/shell/explorer/desktop/desktop.cpp [iso-8859-1] (original)
+++ trunk/reactos/base/shell/explorer/desktop/desktop.cpp [iso-8859-1] Thu Jul 3 10:58:37
2008
@@ -656,6 +656,7 @@
}
} else
_cm_ifs.reset();
+ DestroyMenu(hmenu);
}
pcm->Release();
Modified: trunk/reactos/base/shell/explorer/explorer.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/explor…
==============================================================================
--- trunk/reactos/base/shell/explorer/explorer.cpp [iso-8859-1] (original)
+++ trunk/reactos/base/shell/explorer/explorer.cpp [iso-8859-1] Thu Jul 3 10:58:37 2008
@@ -855,6 +855,8 @@
{
HMENU hMenu = LoadMenu(g_Globals._hInstance, MAKEINTRESOURCE(nid));
_hmenu = GetSubMenu(hMenu, 0);
+ RemoveMenu(hMenu, 0, MF_BYPOSITION);
+ DestroyMenu(hMenu);
}
Modified: trunk/reactos/base/shell/explorer/utility/shellclasses.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/utilit…
==============================================================================
--- trunk/reactos/base/shell/explorer/utility/shellclasses.cpp [iso-8859-1] (original)
+++ trunk/reactos/base/shell/explorer/utility/shellclasses.cpp [iso-8859-1] Thu Jul 3
10:58:37 2008
@@ -566,6 +566,7 @@
}
} else
cm_ifs.reset();
+ DestroyMenu(hmenu);
}
pcm->Release();
Modified: trunk/reactos/base/shell/explorer/utility/utility.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/utilit…
==============================================================================
--- trunk/reactos/base/shell/explorer/utility/utility.h [iso-8859-1] (original)
+++ trunk/reactos/base/shell/explorer/utility/utility.h [iso-8859-1] Thu Jul 3 10:58:37
2008
@@ -663,6 +663,11 @@
{
}
+ ~PopupMenu()
+ {
+ DestroyMenu(_hmenu);
+ }
+
PopupMenu(UINT nid);
operator HMENU() {return _hmenu;}