I have allocated and array of Objects
Objects *array = new Objects[N];
How should I delete this array? Just
delete[] array
Not only is
delete [] array;
enough, but if you do
for(int i=0;i
you'll be causing undefined behavior, because
delete &array[i];
will be deleting things that weren't returned by a new operation.
Not to mention that the subsequent delete[] array; will call the destructor for all the objects that just had destructors called in the loop.
So don't do that.