Is it possible to shut down a D3D device?

旧时模样 提交于 2021-02-08 10:20:29

问题


I have a test that shows memory leak in my app:

RAM usage increases 30-40MB per iteration, the profiler shows it’s in external code.

Between the iterations, I shut down & then recreate D3D device. When I stopped doing that and just kept the device alive, it became good:

The only difference is 2 interface pointers: ID3D11Device, and IMFDXGIDeviceManager.

Is there a way to shutdown a D3D device so it releases the memory instead of leaking?

As far as I understand, if I would have leaked a resource pointer somewhere, it would continue leaking with an old device. Does it mean the problem is in Windows 10, not in my code? For now, I obviously keeping the device alive, but ideally I’d like a way to implement clean shutdown.

来源:https://stackoverflow.com/questions/52529016/is-it-possible-to-shut-down-a-d3d-device

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!