- Add tracing for proxy ref count functions.

- Release the channel on proxy destruction.
This commit is contained in:
Robert Shearman 2005-01-04 20:33:02 +00:00 committed by Alexandre Julliard
parent 73318dab8f
commit 85763a1711

View file

@ -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);