browseui: Give a name and delete the critical sections.

This commit is contained in:
Francois Gouget 2011-11-14 15:08:39 +01:00 committed by Alexandre Julliard
parent 7480dc0af1
commit 51ab24dd66
2 changed files with 5 additions and 0 deletions

View File

@ -57,6 +57,7 @@ static inline CompCatCacheDaemon *impl_from_IRunnableTask(IRunnableTask *iface)
static void CompCatCacheDaemon_Destructor(CompCatCacheDaemon *This) static void CompCatCacheDaemon_Destructor(CompCatCacheDaemon *This)
{ {
TRACE("destroying %p\n", This); TRACE("destroying %p\n", This);
This->cs.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&This->cs); DeleteCriticalSection(&This->cs);
heap_free(This); heap_free(This);
BROWSEUI_refCount--; BROWSEUI_refCount--;
@ -154,6 +155,7 @@ HRESULT CompCatCacheDaemon_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut)
This->IRunnableTask_iface.lpVtbl = &CompCatCacheDaemonVtbl; This->IRunnableTask_iface.lpVtbl = &CompCatCacheDaemonVtbl;
This->refCount = 1; This->refCount = 1;
InitializeCriticalSection(&This->cs); InitializeCriticalSection(&This->cs);
This->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": CompCatCacheDaemon.cs");
TRACE("returning %p\n", This); TRACE("returning %p\n", This);
*ppOut = (IUnknown *)This; *ppOut = (IUnknown *)This;

View File

@ -260,6 +260,8 @@ static void ProgressDialog_Destructor(ProgressDialog *This)
heap_free(This->cancelMsg); heap_free(This->cancelMsg);
heap_free(This->title); heap_free(This->title);
heap_free(This); heap_free(This);
This->cs.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&This->cs);
BROWSEUI_refCount--; BROWSEUI_refCount--;
} }
@ -503,6 +505,7 @@ HRESULT ProgressDialog_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut)
This->IProgressDialog_iface.lpVtbl = &ProgressDialogVtbl; This->IProgressDialog_iface.lpVtbl = &ProgressDialogVtbl;
This->refCount = 1; This->refCount = 1;
InitializeCriticalSection(&This->cs); InitializeCriticalSection(&This->cs);
This->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": ProgressDialog.cs");
TRACE("returning %p\n", This); TRACE("returning %p\n", This);
*ppOut = (IUnknown *)This; *ppOut = (IUnknown *)This;