0

I am unsure about how D3D11Device::ReportLiveDeviceObjects works?

i am not seeing anything in my output or in a console when i call this.

http://msdn.microsoft.com/en-us/library/windows/desktop/ff476370(v=vs.85).aspx

clamp
  • 33,000
  • 75
  • 203
  • 299

2 Answers2

1

ID3D11Debug::ReportLiveDeviceObjects (not ID3D11Device::) reports to Visual Studio output window.

But, to have this report you must have ID3D11Device, created with D3D11_CREATE_DEVICE_DEBUG flag. (There will be short report by default)

To have detailed report, you must have valid ID3D11Debug object, queried from current device. Like this:

m_pDevice->QueryInterface(__uuidof(ID3D11Debug), (void**)(&m_pD3D11Debug));

Then just call ID3D11Debug::ReportLiveDeviceObjects() with D3D11_RLDO_DETAIL;

If you don't see any warnings, then, probably, all your COMs released correctly. Try create custom temporary leak, to check it for sure.

In my opinion, that report is almost useless. There are lot of false positive warnings.

Just encapsulate your COM objects in some smart COM pointer class, and you can be sure, that they will be released correctly.

Ivan Aksamentov - Drop
  • 12,860
  • 3
  • 34
  • 61
  • thanks, i do have the debug flag on the CreateDevice and i am creating the ID3D11Debug object, but still i do not see anything in the VS output window – clamp Aug 30 '13 at 09:47
1

It is not clear if you are using it from C#, so in case, you must checked "Enable native code debugging" in your project settings as it is explained in http://sharpdx.org/forum/4-general/1774-how-to-debug-a-sharpdxexception#1774

xoofx
  • 3,682
  • 1
  • 17
  • 32
  • yes, i am using it from C# via SharpDX. i thought SharpDX just PInvokes the native version, so there shouldnt be any difference. let me check the native code debugging though. – clamp Sep 02 '13 at 08:47