Module: wine Branch: master Commit: 82f3b86c5c14d968638435206f46a396b019dade URL: http://source.winehq.org/git/wine.git/?a=commit;h=82f3b86c5c14d968638435206f... Author: Christian Costa <titan.costa(a)gmail.com> Date: Fri May 18 12:01:36 2012 +0200 dmusic: Display new ref in trace for AddRef and Release for collection object. --- dlls/dmusic/collection.c | 25 ++++++++++++------------- 1 files changed, 12 insertions(+), 13 deletions(-) diff --git a/dlls/dmusic/collection.c b/dlls/dmusic/collection.c index 2614860..5ef7d35 100644 --- a/dlls/dmusic/collection.c +++ b/dlls/dmusic/collection.c @@ -77,30 +77,29 @@ static HRESULT WINAPI IDirectMusicCollectionImpl_IDirectMusicCollection_QueryInt static ULONG WINAPI IDirectMusicCollectionImpl_IDirectMusicCollection_AddRef(LPDIRECTMUSICCOLLECTION iface) { - IDirectMusicCollectionImpl *This = impl_from_IDirectMusicCollection(iface); - ULONG refCount = InterlockedIncrement(&This->ref); + IDirectMusicCollectionImpl *This = impl_from_IDirectMusicCollection(iface); + ULONG ref = InterlockedIncrement(&This->ref); - TRACE("(%p)->(ref before=%u)\n", This, refCount - 1); + TRACE("(%p/%p)->(): new ref = %u)\n", iface, This, ref); - DMUSIC_LockModule(); + DMUSIC_LockModule(); - return refCount; + return ref; } static ULONG WINAPI IDirectMusicCollectionImpl_IDirectMusicCollection_Release(LPDIRECTMUSICCOLLECTION iface) { - IDirectMusicCollectionImpl *This = impl_from_IDirectMusicCollection(iface); - ULONG refCount = InterlockedDecrement(&This->ref); + IDirectMusicCollectionImpl *This = impl_from_IDirectMusicCollection(iface); + ULONG ref = InterlockedDecrement(&This->ref); - TRACE("(%p)->(ref before=%u)\n", This, refCount + 1); + TRACE("(%p/%p)->(): new ref = %u)\n", iface, This, ref); - if (!refCount) { - HeapFree(GetProcessHeap(), 0, This); - } + if (!ref) + HeapFree(GetProcessHeap(), 0, This); - DMUSIC_UnlockModule(); + DMUSIC_UnlockModule(); - return refCount; + return ref; } /* IDirectMusicCollection Interface follows: */