mirror of
https://github.com/reactos/reactos.git
synced 2025-06-20 01:55:34 +00:00
[BROWSEUI]
* SHOnCWMCommandLine: Fix IETHREADPARAM leak. [SHELL32] * Fix HMENU leak of the popup used in the view mode button of the toolbar. [RSHELL] * Undo a previous change to help debug the leaks. * Remove child submenus when closing a menu band. * Add some extra verification for debugging purposes. [BROWSEUI] [RSHELL] [SHELL32] * Move ReleaseCComPtrExpectZero to the shared header. svn path=/branches/shell-experiments/; revision=64858
This commit is contained in:
parent
b138a8620d
commit
96cdae0a7c
9 changed files with 184 additions and 91 deletions
|
@ -171,7 +171,17 @@ HRESULT STDMETHODCALLTYPE CMenuDeskBar::SetClient(IUnknown *punkClient)
|
|||
CComPtr<IDeskBarClient> pDeskBandClient;
|
||||
HRESULT hr;
|
||||
|
||||
m_Client.Release();
|
||||
if (m_Client)
|
||||
{
|
||||
hr = m_Client->QueryInterface(IID_PPV_ARG(IDeskBarClient, &pDeskBandClient));
|
||||
if (FAILED_UNEXPECTEDLY(hr))
|
||||
return hr;
|
||||
|
||||
pDeskBandClient->SetDeskBarSite(NULL);
|
||||
|
||||
pDeskBandClient = NULL;
|
||||
m_Client = NULL;
|
||||
}
|
||||
|
||||
if (punkClient == NULL)
|
||||
return S_OK;
|
||||
|
@ -222,9 +232,19 @@ HRESULT STDMETHODCALLTYPE CMenuDeskBar::SetSite(IUnknown *pUnkSite)
|
|||
if (m_Shown)
|
||||
_CloseBar();
|
||||
|
||||
m_SubMenuParent = NULL;
|
||||
|
||||
m_Site = pUnkSite;
|
||||
|
||||
IUnknown_QueryService(m_Site, SID_SMenuPopup, IID_PPV_ARG(IMenuPopup, &m_SubMenuParent));
|
||||
if (m_Site)
|
||||
{
|
||||
IUnknown_QueryService(m_Site, SID_SMenuPopup, IID_PPV_ARG(IMenuPopup, &m_SubMenuParent));
|
||||
}
|
||||
else
|
||||
{
|
||||
DestroyWindow();
|
||||
SetClient(NULL);
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue