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 !
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…