P4 to Git Change 1155068 by jatang@jatang-opencl-hsa-stg1 on 2015/05/27 17:48:24

EPR #419347 - Fix a d3d9 memory leak.

	According to https://msdn.microsoft.com/en-us/library/windows/desktop/bb174386(v=vs.85).aspx: “Calling IDirect3DDevice9::GetDirect3D will increase the internal reference count on the IDirect3D9 interface. Failure to call IUnknown::Release when finished using this IDirect3D9 interface results in a memory leak.”.

	Although p3d9devEx->Release() has the same effect as p3d9dev->Release(), for clarification we better use p3d9dev->Release() instead.

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/GSLDeviceD3D9.cpp#13 edit


[ROCm/clr commit: 6d913bfc23]
This commit is contained in:
foreman
2015-05-27 18:00:49 -04:00
parent 27569578df
commit 3c36106589
@@ -34,7 +34,7 @@ CALGSLDevice::associateD3D9Device(void* d3d9Device)
IDirect3D9Ex* p3d9devEx = static_cast<IDirect3D9Ex*>(p3d9dev);
p3d9devEx->GetAdapterLUID(pCaps.AdapterOrdinal, &d3d9deviceLuid);
p3d9devEx->Release();
p3d9dev->Release();
// match the adapter
if (m_adp->getMVPUinfo(&calDevAdapterLuid, &calDevChainBitMask))