d3d10core: Release the wined3d query in d3d10_query_Release() (Valgrind).
This commit is contained in:
parent
0a12107604
commit
39fc855316
|
@ -66,16 +66,17 @@ static ULONG STDMETHODCALLTYPE d3d10_query_AddRef(ID3D10Query *iface)
|
||||||
|
|
||||||
static ULONG STDMETHODCALLTYPE d3d10_query_Release(ID3D10Query *iface)
|
static ULONG STDMETHODCALLTYPE d3d10_query_Release(ID3D10Query *iface)
|
||||||
{
|
{
|
||||||
struct d3d10_query *This = impl_from_ID3D10Query(iface);
|
struct d3d10_query *query = impl_from_ID3D10Query(iface);
|
||||||
ULONG refcount = InterlockedDecrement(&This->refcount);
|
ULONG refcount = InterlockedDecrement(&query->refcount);
|
||||||
|
|
||||||
TRACE("%p decreasing refcount to %u.\n", This, refcount);
|
TRACE("%p decreasing refcount to %u.\n", query, refcount);
|
||||||
|
|
||||||
if (!refcount)
|
if (!refcount)
|
||||||
{
|
{
|
||||||
ID3D10Device1_Release(This->device);
|
ID3D10Device1_Release(query->device);
|
||||||
wined3d_private_store_cleanup(&This->private_store);
|
wined3d_query_decref(query->wined3d_query);
|
||||||
HeapFree(GetProcessHeap(), 0, This);
|
wined3d_private_store_cleanup(&query->private_store);
|
||||||
|
HeapFree(GetProcessHeap(), 0, query);
|
||||||
}
|
}
|
||||||
|
|
||||||
return refcount;
|
return refcount;
|
||||||
|
|
Loading…
Reference in New Issue