static ULONG WINAPI InternetExplorer_Release(IWebBrowser2 *iface) { InternetExplorer *This = impl_from_IWebBrowser2(iface); LONG ref = InterlockedDecrement(&This->ref); TRACE("(%p) ref=%d\n", This, ref); if(!ref) { if(This->doc_host) { deactivate_document(&This->doc_host->doc_host); DocHost_Release(&This->doc_host->doc_host); if(This->doc_host) { This->doc_host->ie = NULL; This->doc_host->doc_host.container_vtbl->release(&This->doc_host->doc_host); } } if(This->frame_hwnd) DestroyWindow(This->frame_hwnd); list_remove(&This->entry); heap_free(This); released_obj(); } return ref; }
static ULONG WINAPI WebBrowser_Release(IWebBrowser2 *iface) { WebBrowser *This = impl_from_IWebBrowser2(iface); LONG ref = InterlockedDecrement(&This->ref); TRACE("(%p) ref=%d\n", This, ref); if(!ref) { if(This->doc_host.document) IUnknown_Release(This->doc_host.document); DocHost_Release(&This->doc_host); WebBrowser_OleObject_Destroy(This); heap_free(This); unlock_module(); } return ref; }
static ULONG WINAPI WebBrowser_Release(IWebBrowser2 *iface) { WebBrowser *This = WEBBROWSER_THIS(iface); LONG ref = InterlockedDecrement(&This->ref); TRACE("(%p) ref=%ld\n", This, ref); if(!ref) { if(This->doc_host.document) IUnknown_Release(This->doc_host.document); DocHost_Release(&This->doc_host); WebBrowser_OleObject_Destroy(This); shdocvw_free(This); SHDOCVW_UnlockModule(); } return ref; }