Author: dquintana
Date: Fri Oct 24 16:03:58 2014
New Revision: 64960
URL:
http://svn.reactos.org/svn/reactos?rev=64960&view=rev
Log:
[RSHELL]
* Fix HMENU leak in menu-based shell popups (and menubar).
Modified:
branches/shell-experiments/base/shell/rshell/CMenuBand.cpp
Modified: branches/shell-experiments/base/shell/rshell/CMenuBand.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rs…
==============================================================================
--- branches/shell-experiments/base/shell/rshell/CMenuBand.cpp [iso-8859-1] (original)
+++ branches/shell-experiments/base/shell/rshell/CMenuBand.cpp [iso-8859-1] Fri Oct 24
16:03:58 2014
@@ -72,6 +72,9 @@
if (m_SFToolbar)
delete m_SFToolbar;
+
+ if (m_hmenu)
+ DestroyMenu(m_hmenu);
}
HRESULT STDMETHODCALLTYPE CMenuBand::Initialize(
@@ -128,6 +131,12 @@
TRACE("CMenuBand::SetMenu called, hmenu=%p; hwnd=%p, flags=%x\n", hmenu,
hwnd, dwFlags);
BOOL created = FALSE;
+
+ if (m_hmenu)
+ {
+ DestroyMenu(m_hmenu);
+ m_hmenu = NULL;
+ }
if (m_staticToolbar == NULL)
{