Consider:
int *p = new int[10];
The linked reply states:
NOTE: One can free the memory even by delete p;, but it will free only the first element memory.
This sounds like delete p
is OK. Is this correct? I would expect that delete p
should result in undefined behavior...