For native data types and user data types that do not have destructors using delete or delete[] , will mean the same thing. The primary heap manager will free up all memory. But calling scaler delete on the vector new ( new[] ) will not result in calling all destructors. The destructor will be called only once for the very first object.
The behavior above depends on the compiler / heap manager (which handles new and delete ). For better portability, use scaling delete to scale new and vector delete ( delete[] ) for vector new .
source share