Forget about destructors. The difference between new/delete
and new[]/delete[]
is that these are two completely unrelated, independent memory allocation mechanisms. They cannot be mixed. Using delete
to deallocate memory allocated with new[]
is no different than using free
for the same purpose.