Hi
I get "debug assertion failure" (using Visual studio 2013) with:
Expression: _BLOCK_TYPE_IS_VALID(pHead->nBlockUse)
void world::deleteArmy(army * u){
armyList.erase(u->curIt);
delete u;
}
It happens on the delete row. "u" is still pointing to a valid instance of the army class. The armyList is a std-list of type <* army>.
What can cause this? Is the iterator messed up maybe so when I erase the iterator the list gets corrupted? But shouldnt it complain on that row and not on the delete row?
Thanks a lot!
Erik
↧