browseui: Always use interlocked functions when accessing variable BROWSEUI_refCount.

This commit is contained in:
Sebastian Lackner 2015-03-01 03:46:06 +01:00 committed by Alexandre Julliard
parent 7c48641100
commit 890dc4d260
3 changed files with 6 additions and 6 deletions

View File

@ -74,7 +74,7 @@ static void ClassFactory_Destructor(ClassFactory *This)
{
TRACE("Destroying class factory %p\n", This);
heap_free(This);
BROWSEUI_refCount--;
InterlockedDecrement(&BROWSEUI_refCount);
}
static HRESULT WINAPI ClassFactory_QueryInterface(IClassFactory *iface, REFIID riid, LPVOID *ppvOut)
@ -154,7 +154,7 @@ static HRESULT ClassFactory_Constructor(LPFNCONSTRUCTOR ctor, LPVOID *ppvOut)
This->ctor = ctor;
*ppvOut = This;
TRACE("Created class factory %p\n", This);
BROWSEUI_refCount++;
InterlockedIncrement(&BROWSEUI_refCount);
return S_OK;
}

View File

@ -60,7 +60,7 @@ static void CompCatCacheDaemon_Destructor(CompCatCacheDaemon *This)
This->cs.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&This->cs);
heap_free(This);
BROWSEUI_refCount--;
InterlockedDecrement(&BROWSEUI_refCount);
}
static HRESULT WINAPI CompCatCacheDaemon_QueryInterface(IRunnableTask *iface, REFIID iid, LPVOID *ppvOut)
@ -159,6 +159,6 @@ HRESULT CompCatCacheDaemon_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut)
TRACE("returning %p\n", This);
*ppOut = (IUnknown *)This;
BROWSEUI_refCount++;
InterlockedIncrement(&BROWSEUI_refCount);
return S_OK;
}

View File

@ -268,7 +268,7 @@ static void ProgressDialog_Destructor(ProgressDialog *This)
This->cs.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&This->cs);
heap_free(This);
BROWSEUI_refCount--;
InterlockedDecrement(&BROWSEUI_refCount);
}
static HRESULT WINAPI ProgressDialog_QueryInterface(IProgressDialog *iface, REFIID iid, LPVOID *ppvOut)
@ -574,6 +574,6 @@ HRESULT ProgressDialog_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut)
TRACE("returning %p\n", This);
*ppOut = (IUnknown *)This;
BROWSEUI_refCount++;
InterlockedIncrement(&BROWSEUI_refCount);
return S_OK;
}