int main () {
char *str = new char[3];
//delete[] str; // OK
delete str; // OK too
return 0;
}
I know I need to call delete[] for new []. However, this "delete str" passes compilation. Is there memory leaking in "delete str" in this case?