Jump to content
  • Advertisement
Sign in to follow this  
ArchangelMorph

Cleaning up device objects..

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

I'm coming to the end of the grind with my current project but I encountered a little problem.. My app doesn't seem to clean up all my device objects in certain circumstances but in others it sorts everything out perfectly.. In my app I create the device-related objects for my menu system at startup and then create those which relate to my game when a new game has been selected and has begun to load.. once a game has finished I clean up all the game-related objects as I return to the main menu system and then clean up the main menu system objects on application termination.. Now when I load the app into the menus and then terminate the app its fine.. When I load up the app, load up a new game and then terminate the app its still not a problem.. However when I load up the app, a new game and then return from the game back to the main menu, on terminating the app I get a memory leak.. Please note that every app termination control calls exactly the same set of methods to clean up all the objects in the app.. I've tried running the debugger but it doesn't help me isolate exactly where the memory leak occured so I don't know which object is not being destroyed so I can sort out the code for it.. So I need to know how I could isolate the problem and then deal with it? Anyone else encountered any problems like this in the past? How did you overcome them?

Share this post


Link to post
Share on other sites
Advertisement
Have you tried to use PIX? PIX has a profile option called "replayable call stream". If you run your program in PIX with this option, it will give you a report of every object you created with DirectX. Once you have that, you can find which objects aren't being cleaned up and go from there.

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!