Christian Costa : dmusic: Display new ref in AddRef and Release methods.
Module: wine Branch: master Commit: d46f8e316a136d9667672b8668a075255cc2d6bb URL: http://source.winehq.org/git/wine.git/?a=commit;h=d46f8e316a136d9667672b8668... Author: Christian Costa <titan.costa(a)gmail.com> Date: Mon Sep 17 22:32:06 2012 +0200 dmusic: Display new ref in AddRef and Release methods. --- dlls/dmusic/port.c | 25 ++++++++++++------------- 1 files changed, 12 insertions(+), 13 deletions(-) diff --git a/dlls/dmusic/port.c b/dlls/dmusic/port.c index 2530fb9..0626518 100644 --- a/dlls/dmusic/port.c +++ b/dlls/dmusic/port.c @@ -67,30 +67,29 @@ static HRESULT WINAPI IDirectMusicPortImpl_QueryInterface(LPDIRECTMUSICPORT ifac static ULONG WINAPI IDirectMusicPortImpl_AddRef(LPDIRECTMUSICPORT iface) { - IDirectMusicPortImpl *This = impl_from_IDirectMusicPort(iface); - ULONG refCount = InterlockedIncrement(&This->ref); + IDirectMusicPortImpl *This = impl_from_IDirectMusicPort(iface); + 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 IDirectMusicPortImpl_Release(LPDIRECTMUSICPORT iface) { - IDirectMusicPortImpl *This = impl_from_IDirectMusicPort(iface); - ULONG refCount = InterlockedDecrement(&This->ref); + IDirectMusicPortImpl *This = impl_from_IDirectMusicPort(iface); + ULONG ref = InterlockedDecrement(&This->ref); - TRACE("(%p)->(ref before=%u)\n", This, refCount + 1); + TRACE("(%p)->(): new ref = %u\n", This, ref); - if (!refCount) { - HeapFree(GetProcessHeap(), 0, This); - } + if (!ref) + HeapFree(GetProcessHeap(), 0, This); - DMUSIC_UnlockModule(); + DMUSIC_UnlockModule(); - return refCount; + return ref; } /* IDirectMusicPortImpl IDirectMusicPort part: */
participants (1)
-
Alexandre Julliard