_CrtDumpMemoryLeak and COM

Started by
2 comments, last by MJP 13 years, 4 months ago
Does it detect COM resource leaks? I'm using it in a very simple DirectX11 application I wrote, and even if I fail to release all COM interfaces, it doesn't complain. Is this function supposed to be able to catch those kind of resource leaks or do I have to do something in order to make it work?

Thanks.
Advertisement
D3D11 has built-in memory leak detection. Just pass D3D11_CREATE_DEVICE_DEBUG when creating your device, and when your app exists it will print a memory leak report in the debug spew.
Just in case this saves me some time: Will it still find leaks with DirectInput8 and other/older DirectX APIs? Are there any other common/likely game APIs that you know of that the debug heap checking functions won't detect resource/memory leaks from?

Thank a lot though. I will definitely try this out when I get home.

DX10 works the same way, For DX9, you have to go into the DirectX Control Panel and enable the debug runtimes. I have no idea if DirectInput has any leak detection.

This topic is closed to new replies.

Advertisement