Archived

This topic is now archived and is closed to further replies.

Releasing a DDraw surface is crashing my prog

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

At the end of my program, I release a couple of surfaces, but the one I use to release my surface containing a bitmap is making a Windows error box pop up before the program has a chance to quit... I suppose the program can live on without releasing it, but I''d hate to anger the Direct X gods in such a manner. Heres the code: if (bitmap_surf != NULL) bitmap_surf->Release(); So, any clues anyone? **Bows in prayer to the Direct X gods (as always, facing the direction of Microsoft Headquarters)**

Share this post


Link to post
Share on other sites
Are you releasing it BEFORE you release most of the other stuff?
You should release it before you release things like, primary,
secondary surfaces and the directdraw object.

-Hyatus
"da da da"

Share this post


Link to post
Share on other sites
Ah, thanks! That did it. Didn''t know order mattered.
Heh, just checked my System Resources... i was down to 25% because I had loaded a bitmap surface lots of times, never releasing once.
My computer thanks you too :D

Share this post


Link to post
Share on other sites