Assertion Failure deleting surfaces

Started by
0 comments, last by squicklid 19 years, 7 months ago
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?
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.

This topic is closed to new replies.

Advertisement