From ea532f633c6af03c642537cce2925da22c2fdf9a Mon Sep 17 00:00:00 2001 From: Christian Costa Date: Fri, 16 Mar 2012 08:16:10 +0100 Subject: [PATCH] d3drm: Add refcount info to AddRef and Release traces. --- dlls/d3drm/d3drm.c | 7 ++++--- dlls/d3drm/device.c | 7 ++++--- dlls/d3drm/frame.c | 7 ++++--- dlls/d3drm/meshbuilder.c | 7 ++++--- dlls/d3drm/viewport.c | 7 ++++--- 5 files changed, 20 insertions(+), 15 deletions(-) diff --git a/dlls/d3drm/d3drm.c b/dlls/d3drm/d3drm.c index 879d8b0639..d140c087f0 100644 --- a/dlls/d3drm/d3drm.c +++ b/dlls/d3drm/d3drm.c @@ -87,10 +87,11 @@ static HRESULT WINAPI IDirect3DRMImpl_QueryInterface(IDirect3DRM* iface, REFIID static ULONG WINAPI IDirect3DRMImpl_AddRef(IDirect3DRM* iface) { IDirect3DRMImpl *This = impl_from_IDirect3DRM(iface); + ULONG ref = InterlockedIncrement(&This->ref); - TRACE("(%p/%p)\n", iface, This); + TRACE("(%p/%p)->(): new ref = %d\n", iface, This, ref); - return InterlockedIncrement(&This->ref); + return ref; } static ULONG WINAPI IDirect3DRMImpl_Release(IDirect3DRM* iface) @@ -98,7 +99,7 @@ static ULONG WINAPI IDirect3DRMImpl_Release(IDirect3DRM* iface) IDirect3DRMImpl *This = impl_from_IDirect3DRM(iface); ULONG ref = InterlockedDecrement(&This->ref); - TRACE("(%p/%p)\n", iface, This); + TRACE("(%p/%p)->(): new ref = %d\n", iface, This, ref); if (!ref) HeapFree(GetProcessHeap(), 0, This); diff --git a/dlls/d3drm/device.c b/dlls/d3drm/device.c index 559128e7a9..e6d1036515 100644 --- a/dlls/d3drm/device.c +++ b/dlls/d3drm/device.c @@ -93,10 +93,11 @@ static HRESULT WINAPI IDirect3DRMDevice2Impl_QueryInterface(IDirect3DRMDevice2* static ULONG WINAPI IDirect3DRMDevice2Impl_AddRef(IDirect3DRMDevice2* iface) { IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface); + ULONG ref = InterlockedIncrement(&This->ref); - TRACE("(%p)\n", This); + TRACE("(%p)->(): new ref = %d\n", iface, ref); - return InterlockedIncrement(&This->ref); + return ref; } static ULONG WINAPI IDirect3DRMDevice2Impl_Release(IDirect3DRMDevice2* iface) @@ -104,7 +105,7 @@ static ULONG WINAPI IDirect3DRMDevice2Impl_Release(IDirect3DRMDevice2* iface) IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface); ULONG ref = InterlockedDecrement(&This->ref); - TRACE("(%p)\n", This); + TRACE("(%p)->(): new ref = %d\n", iface, ref); if (!ref) HeapFree(GetProcessHeap(), 0, This); diff --git a/dlls/d3drm/frame.c b/dlls/d3drm/frame.c index d91def8adf..5d5427f75c 100644 --- a/dlls/d3drm/frame.c +++ b/dlls/d3drm/frame.c @@ -78,10 +78,11 @@ static HRESULT WINAPI IDirect3DRMFrame2Impl_QueryInterface(IDirect3DRMFrame2* if static ULONG WINAPI IDirect3DRMFrame2Impl_AddRef(IDirect3DRMFrame2* iface) { IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface); + ULONG ref = InterlockedIncrement(&This->ref); - TRACE("(%p)\n", This); + TRACE("(%p)->(): new ref = %d\n", This, ref); - return InterlockedIncrement(&This->ref); + return ref; } static ULONG WINAPI IDirect3DRMFrame2Impl_Release(IDirect3DRMFrame2* iface) @@ -89,7 +90,7 @@ static ULONG WINAPI IDirect3DRMFrame2Impl_Release(IDirect3DRMFrame2* iface) IDirect3DRMFrameImpl *This = impl_from_IDirect3DRMFrame2(iface); ULONG ref = InterlockedDecrement(&This->ref); - TRACE("(%p)\n", This); + TRACE("(%p)->(): new ref = %d\n", This, ref); if (!ref) HeapFree(GetProcessHeap(), 0, This); diff --git a/dlls/d3drm/meshbuilder.c b/dlls/d3drm/meshbuilder.c index 6f5451b7ea..e9d0e67ede 100644 --- a/dlls/d3drm/meshbuilder.c +++ b/dlls/d3drm/meshbuilder.c @@ -322,10 +322,11 @@ static HRESULT WINAPI IDirect3DRMMeshBuilder2Impl_QueryInterface(IDirect3DRMMesh static ULONG WINAPI IDirect3DRMMeshBuilder2Impl_AddRef(IDirect3DRMMeshBuilder2* iface) { IDirect3DRMMeshBuilderImpl *This = impl_from_IDirect3DRMMeshBuilder2(iface); + ULONG ref = InterlockedIncrement(&This->ref); - TRACE("(%p)\n", This); + TRACE("(%p)->(): new ref = %d\n", This, ref); - return InterlockedIncrement(&This->ref); + return ref; } static ULONG WINAPI IDirect3DRMMeshBuilder2Impl_Release(IDirect3DRMMeshBuilder2* iface) @@ -333,7 +334,7 @@ static ULONG WINAPI IDirect3DRMMeshBuilder2Impl_Release(IDirect3DRMMeshBuilder2* IDirect3DRMMeshBuilderImpl *This = impl_from_IDirect3DRMMeshBuilder2(iface); ULONG ref = InterlockedDecrement(&This->ref); - TRACE("(%p)\n", This); + TRACE("(%p)->(): new ref = %d\n", This, ref); if (!ref) { diff --git a/dlls/d3drm/viewport.c b/dlls/d3drm/viewport.c index 16e812a222..5122140fc1 100644 --- a/dlls/d3drm/viewport.c +++ b/dlls/d3drm/viewport.c @@ -80,10 +80,11 @@ static HRESULT WINAPI IDirect3DRMViewportImpl_QueryInterface(IDirect3DRMViewport static ULONG WINAPI IDirect3DRMViewportImpl_AddRef(IDirect3DRMViewport* iface) { IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport(iface); + ULONG ref = InterlockedIncrement(&This->ref); - TRACE("(%p)\n", This); + TRACE("(%p)->(): new ref = %d\n", This, ref); - return InterlockedIncrement(&This->ref); + return ref; } static ULONG WINAPI IDirect3DRMViewportImpl_Release(IDirect3DRMViewport* iface) @@ -91,7 +92,7 @@ static ULONG WINAPI IDirect3DRMViewportImpl_Release(IDirect3DRMViewport* iface) IDirect3DRMViewportImpl *This = impl_from_IDirect3DRMViewport(iface); ULONG ref = InterlockedDecrement(&This->ref); - TRACE("(%p)\n", This); + TRACE("(%p)->(): new ref = %d\n", This, ref); if (!ref) HeapFree(GetProcessHeap(), 0, This);