Jump to content
  • Advertisement
Sign in to follow this  

[DX9] the memory leak that isn't a leak

This topic is 2539 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 have a small memory leak in my game, as reported by PIX and D3DX. It's a single, small vertex buffer of data, but here's the thing - it gets released.

I have tracked this variable from start to finish, and it only ever has 4 things happen:

the buffer gets created
it gets locked
it gets unlocked
it gets released

There's only ever one pointer to the buffer and that gets released. Yet D3DX and PIX are reporting it as a leak.

I'm completely stumped here - I have no idea why it would not be released. Debug runtimes don't give any errors or warnings during creation/destruction of the buffer, and it's definitely unlocked with only one reference to it at release time.

Anyone have anything similar happen to them before? Or maybe you have some ideas to try out?

Share this post


Link to post
Share on other sites
Advertisement
Did you check the return value of Release to check that it was the last reference?

As a completely out of the box idea --- does the leak go away if you render a few more frames before shutting down (just Clear and Present a few times)?

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!