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:
~destructor()
{
if(pointer != NULL)
{
delete pointer;
pointer = NULL;
}
}
[\code]
This isn't supposed to be necessary, correct? Is Visual Studio screwed up or is this supposed to happen?