According to everything I have read, I should be able to call delete on a pointer more than once without a crash. I recently ran into an issue with Visual Studio where the destructor was called more than once. That was due to a problem in my code and was corrected, but oddly, this caused a crash. If I did this, there was no crash:
if(pointer != NULL)
pointer = NULL;
This isn't supposed to be necessary, correct? Is Visual Studio screwed up or is this supposed to happen?
Edited by MarkS, 29 May 2013 - 03:50 PM.