msxml3: Trace DOM document reference counts.

This commit is contained in:
Nikolay Sivov 2010-11-08 00:01:50 +03:00 committed by Alexandre Julliard
parent 804c50fb6c
commit ec1ab037c8
1 changed files with 6 additions and 6 deletions

View File

@ -864,8 +864,9 @@ static ULONG WINAPI domdoc_AddRef(
IXMLDOMDocument3 *iface ) IXMLDOMDocument3 *iface )
{ {
domdoc *This = impl_from_IXMLDOMDocument3( iface ); domdoc *This = impl_from_IXMLDOMDocument3( iface );
TRACE("%p\n", This ); ULONG ref = InterlockedIncrement( &This->ref );
return InterlockedIncrement( &This->ref ); TRACE("(%p)->(%d)\n", This, ref );
return ref;
} }
@ -873,11 +874,10 @@ static ULONG WINAPI domdoc_Release(
IXMLDOMDocument3 *iface ) IXMLDOMDocument3 *iface )
{ {
domdoc *This = impl_from_IXMLDOMDocument3( iface ); domdoc *This = impl_from_IXMLDOMDocument3( iface );
LONG ref; LONG ref = InterlockedDecrement( &This->ref );
TRACE("%p\n", This ); TRACE("(%p)->(%d)\n", This, ref );
ref = InterlockedDecrement( &This->ref );
if ( ref == 0 ) if ( ref == 0 )
{ {
if(This->bsc) if(This->bsc)
@ -888,7 +888,7 @@ static ULONG WINAPI domdoc_Release(
destroy_xmlnode(&This->node); destroy_xmlnode(&This->node);
if(This->schema) IXMLDOMSchemaCollection2_Release(This->schema); if(This->schema) IXMLDOMSchemaCollection2_Release(This->schema);
if (This->stream) IStream_Release(This->stream); if (This->stream) IStream_Release(This->stream);
HeapFree( GetProcessHeap(), 0, This ); heap_free(This);
} }
return ref; return ref;