[PATCH 4/8] d3drm: Add refcount info to AddRed and Release traces. (try 2) (resend)
Christian Costa
titan.costa at gmail.com
Wed Mar 14 03:06:43 CDT 2012
This time always show new refcount and simplify the message.
---
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 879d8b0..d140c08 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 559128e..e6d1036 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 d91def8..5d5427f 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 010e198..f57c23d 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 16e812a..5122140 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);
More information about the wine-patches
mailing list