Possible Duplicate:
Is there any reason to check for a NULL pointer before deleting ?
Is there a bug in this code
Type * p = 0;
delete p;
p
is a null pointer here. will there be any issues in implementing this.
Possible Duplicate:
Is there any reason to check for a NULL pointer before deleting ?
Is there a bug in this code
Type * p = 0;
delete p;
p
is a null pointer here. will there be any issues in implementing this.
No, it's specified in the C++ specification that delete
on a null pointer does nothing.