public member function
<vector>

std::vector::~vector

~vector();
Vector destructor
Destroys the container object.

This destroys all container elements, and deallocates all the storage capacity allocated by the vector using its allocator.
This calls allocator_traits::destroy on each of the contained elements, and deallocates all the storage capacity allocated by the vector using its allocator.


複雜度

Linear in vector::size (destructors).

迭代器有效性

所有迭代器、指標和引用都將失效。

資料競爭

The container and all its elements are modified.

異常安全

無異常保證: 絕不丟擲異常。