Sign in to follow this  

Best way of finding resource leaks

This topic is 674 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

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

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

This topic is 674 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this