Commit 31a58298 authored by Christian Costa's avatar Christian Costa Committed by Alexandre Julliard

dmusic: Display new ref in AddRef and Release.

parent db390b77
...@@ -45,30 +45,29 @@ static HRESULT WINAPI IReferenceClockImpl_QueryInterface(IReferenceClock *iface, ...@@ -45,30 +45,29 @@ static HRESULT WINAPI IReferenceClockImpl_QueryInterface(IReferenceClock *iface,
static ULONG WINAPI IReferenceClockImpl_AddRef(IReferenceClock *iface) static ULONG WINAPI IReferenceClockImpl_AddRef(IReferenceClock *iface)
{ {
IReferenceClockImpl *This = impl_from_IReferenceClock(iface); IReferenceClockImpl *This = impl_from_IReferenceClock(iface);
ULONG refCount = InterlockedIncrement(&This->ref); ULONG ref = InterlockedIncrement(&This->ref);
TRACE("(%p)->(ref before=%u)\n", This, refCount - 1); TRACE("(%p)->(): new ref = %u\n", This, ref);
DMUSIC_LockModule(); DMUSIC_LockModule();
return refCount; return ref;
} }
static ULONG WINAPI IReferenceClockImpl_Release(IReferenceClock *iface) static ULONG WINAPI IReferenceClockImpl_Release(IReferenceClock *iface)
{ {
IReferenceClockImpl *This = impl_from_IReferenceClock(iface); IReferenceClockImpl *This = impl_from_IReferenceClock(iface);
ULONG refCount = InterlockedDecrement(&This->ref); ULONG ref = InterlockedDecrement(&This->ref);
TRACE("(%p)->(ref before=%u)\n", This, refCount + 1); TRACE("(%p)->(): new ref = %u\n", This, ref);
if (!refCount) { if (!ref)
HeapFree(GetProcessHeap(), 0, This); HeapFree(GetProcessHeap(), 0, This);
}
DMUSIC_UnlockModule(); DMUSIC_UnlockModule();
return refCount; return ref;
} }
/* IReferenceClockImpl IReferenceClock part: */ /* IReferenceClockImpl IReferenceClock part: */
......
...@@ -80,7 +80,7 @@ static ULONG WINAPI IDirectMusicCollectionImpl_IDirectMusicCollection_AddRef(LPD ...@@ -80,7 +80,7 @@ static ULONG WINAPI IDirectMusicCollectionImpl_IDirectMusicCollection_AddRef(LPD
IDirectMusicCollectionImpl *This = impl_from_IDirectMusicCollection(iface); IDirectMusicCollectionImpl *This = impl_from_IDirectMusicCollection(iface);
ULONG ref = InterlockedIncrement(&This->ref); ULONG ref = InterlockedIncrement(&This->ref);
TRACE("(%p/%p)->(): new ref = %u)\n", iface, This, ref); TRACE("(%p/%p)->(): new ref = %u\n", iface, This, ref);
DMUSIC_LockModule(); DMUSIC_LockModule();
...@@ -92,7 +92,7 @@ static ULONG WINAPI IDirectMusicCollectionImpl_IDirectMusicCollection_Release(LP ...@@ -92,7 +92,7 @@ static ULONG WINAPI IDirectMusicCollectionImpl_IDirectMusicCollection_Release(LP
IDirectMusicCollectionImpl *This = impl_from_IDirectMusicCollection(iface); IDirectMusicCollectionImpl *This = impl_from_IDirectMusicCollection(iface);
ULONG ref = InterlockedDecrement(&This->ref); ULONG ref = InterlockedDecrement(&This->ref);
TRACE("(%p/%p)->(): new ref = %u)\n", iface, This, ref); TRACE("(%p/%p)->(): new ref = %u\n", iface, This, ref);
if (!ref) if (!ref)
HeapFree(GetProcessHeap(), 0, This); HeapFree(GetProcessHeap(), 0, This);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment