Module: wine Branch: master Commit: e58b0dd079bdfd3106e955a118a6f3290aabc6e0 URL: http://source.winehq.org/git/wine.git/?a=commit;h=e58b0dd079bdfd3106e955a118...
Author: Michael Stefaniuc mstefani@redhat.de Date: Thu Apr 28 00:51:19 2011 +0200
shdocvw: Merge the Destroy functions into the coresponding Release functions.
---
dlls/shdocvw/shlinstobj.c | 23 +++++++---------------- 1 files changed, 7 insertions(+), 16 deletions(-)
diff --git a/dlls/shdocvw/shlinstobj.c b/dlls/shdocvw/shlinstobj.c index 921a909..9a5bee8 100644 --- a/dlls/shdocvw/shlinstobj.c +++ b/dlls/shdocvw/shlinstobj.c @@ -58,13 +58,6 @@ static inline RegistryPropertyBag *impl_from_IPropertyBag(IPropertyBag *iface) return CONTAINING_RECORD(iface, RegistryPropertyBag, IPropertyBag_iface); }
-static void RegistryPropertyBag_Destroy(RegistryPropertyBag *This) { - TRACE("This=%p)\n", This); - - RegCloseKey(This->m_hInitPropertyBagKey); - heap_free(This); -} - static HRESULT WINAPI RegistryPropertyBag_IPropertyBag_QueryInterface(IPropertyBag *iface, REFIID riid, void **ppv) { @@ -110,8 +103,10 @@ static ULONG WINAPI RegistryPropertyBag_IPropertyBag_Release(IPropertyBag *iface
cRef = InterlockedDecrement(&This->m_cRef);
- if (cRef == 0) { - RegistryPropertyBag_Destroy(This); + if (cRef == 0) { + TRACE("Destroying This=%p)\n", This); + RegCloseKey(This->m_hInitPropertyBagKey); + heap_free(This); SHDOCVW_UnlockModule(); }
@@ -214,11 +209,6 @@ static inline InstanceObjectFactory *impl_from_IClassFactory(IClassFactory *ifac return CONTAINING_RECORD(iface, InstanceObjectFactory, IClassFactory_iface); }
-static void InstanceObjectFactory_Destroy(InstanceObjectFactory *This) { - IPropertyBag_Release(This->m_pPropertyBag); - heap_free(This); -} - static HRESULT WINAPI InstanceObjectFactory_IClassFactory_QueryInterface(IClassFactory *iface, REFIID riid, void **ppv) { @@ -264,9 +254,10 @@ static ULONG WINAPI InstanceObjectFactory_IClassFactory_Release(IClassFactory *i
cRef = InterlockedDecrement(&This->m_cRef);
- if (cRef == 0) { + if (cRef == 0) { IClassFactory_LockServer(iface, FALSE); - InstanceObjectFactory_Destroy(This); + IPropertyBag_Release(This->m_pPropertyBag); + heap_free(This); }
return cRef;