Archived

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

quatre53

Releasing a DDraw surface is crashing my prog

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