In accordance with ISO/IEC 14882:2011 standard (and at least the one preceding it) program behavior is undefined in the case when delete operator (from the standard library) receives a non-null pointer that was created not by a new operator (from the standard library).
Undefined behaviour means that a different result may be obtained when executing program on different compilers, with different settings, for every subsequent call, etc.
PS. In a general case the program should not allow an undefined behavior.
Login in to like
Login in to comment