Don’t forget that MS compiler initiates pointers with 0xCCCCCCCC value. In this case:
void *p; ... //do something here... if (p!=NULL) delete p; // Memory violation The right way void* p = NULL;Or if (p!=NULL && p != 0xCCCCCCCC ) delete p;
size=3>