Jump to content
  • Advertisement
Sign in to follow this  
squicklid

Assertion Failure deleting surfaces

This topic is 5488 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 am creating a dynamic array of LPDIRECTDRAWSURFACE7's using new. Then when I delete it, in debug, it passes the "delete[] srf" statement without error. However, it causes an Assertion Failure later on: File: dbgdel.cpp Line: 47 Expression: _BLOCK_TYPE_IS_VALID(phead->nBlockUse) What could be causing this?

Share this post


Link to post
Share on other sites
Advertisement
It definately has to do with the new and delete on the surfaces because I tried allocating it like:

LPDIRECTDRAWSURFACE7 srf[NUMSRF];

And it works.

Meh, I guess I will have to keep it this way, but its not very user friendly.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!