p and p + 1 point to different places, since you correctly said sizeof(*p) units separately. You cannot delete what was not highlighted, but, for example:
A* p = new A(); p++; delete p-1;
will remove the original distribution. Removing p + 1 when p + 1 was not originally allocated is undefined; glib is reset with:
*** glibc detected *** free(): invalid pointer: 0x0804b009 ***
The implementation cannot be zero p + 1 because p + 1 is not a variable to change. The paragraph said that
delete p;
can translate to
free(p); p = 0;
That doesn't make sense with p + 1
source share