• Advertisement
Sign in to follow this  

Best way of finding resource leaks

This topic is 802 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement