delete vs delete[]

delete [] is "vector delete" and corresponds to vector new, i.e. new[].

You must use the matching pair of allocators. E.g. malloc/free, new/delete, new[]/delete[], else you get undefined behavior.


From the standard (5.3.5/2) :

In the first alternative (delete object), the value of the operand of delete shall be a pointer to a non-array object or a pointer to a sub-object (1.8) representing a base class of such an object (clause 10). If not, the behavior is undefined.

In the second alternative (delete array), the value of the operand of delete shall be the pointer value which resulted from a previous array new-expression. If not, the behavior is undefined.

So no : they are in no way equivalent !