From 85763a1711fffbbb0c1fc156c49660a390579a18 Mon Sep 17 00:00:00 2001 From: Robert Shearman Date: Tue, 4 Jan 2005 20:33:02 +0000 Subject: [PATCH] - Add tracing for proxy ref count functions. - Release the channel on proxy destruction. --- dlls/ole32/marshal.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dlls/ole32/marshal.c b/dlls/ole32/marshal.c index 1e3684eb2b3..57deee351c9 100644 --- a/dlls/ole32/marshal.c +++ b/dlls/ole32/marshal.c @@ -164,7 +164,7 @@ static HRESULT WINAPI ClientIdentity_QueryInterface(IInternalUnknown * iface, RE static ULONG WINAPI ClientIdentity_AddRef(IInternalUnknown * iface) { struct proxy_manager * This = (struct proxy_manager *)iface; - TRACE("%p\n", iface); + TRACE("%p - before %ld\n", iface, This->refs); return InterlockedIncrement(&This->refs); } @@ -172,7 +172,7 @@ static ULONG WINAPI ClientIdentity_Release(IInternalUnknown * iface) { struct proxy_manager * This = (struct proxy_manager *)iface; ULONG refs = InterlockedDecrement(&This->refs); - TRACE("%p\n", iface); + TRACE("%p - after %ld\n", iface, refs); if (!refs) proxy_manager_destroy(This); return refs; @@ -366,6 +366,8 @@ static void proxy_manager_destroy(struct proxy_manager * This) ifproxy_destroy(ifproxy); } + IRpcChannelBuffer_Release(This->chan); + DeleteCriticalSection(&This->cs); HeapFree(GetProcessHeap(), 0, This);