Best way of finding resource leaks

Started by
2 comments, last by 21st Century Moose 8 years, 2 months ago

What is the best way of finding D3D9 resource leaks on a Windows 10 machine nowadays?

I must add that the leak is not easily reproducible also.

I find it more and more difficult to work with legacy D3D9 applications since the debug version no longer works on a modern Windows. Are there any new tools available that can help me, like nSight or GPU PerfStudio or such?

Advertisement

If you've got your own D3D wrapper, then whenever you create a resource, capture a call-stack and a user defined name and store it alongside the resource. When shutting down, print out the names and creation-call-stacks for any leaked, objects. That will at least tell you where it came from.

I use a combination of d3d debug mode (enable in Control panel and use the libs ending with d) and VLD (visual leak detector).
Works good for me

Crealysm game & engine development: http://www.crealysm.com

Looking for a passionate, disciplined and structured producer? PM me

It also helps to know the most likely causes of leaks: getting a surface (either from a texture or from the backbuffer) but not releasing it afterwards, or failing to call the OnLostDevice method of any D3DX objects you've created.

Direct3D has need of instancing, but we do not. We have plenty of glVertexAttrib calls.

This topic is closed to new replies.

Advertisement