std::stack<T,Container>::
~stack
<
cpp
|
container
|
stack
~stack
(
)
;
销毁
stack
。调用元素的析构函数,然后解分配所用的存储。注意,若元素是指针,则不销毁所指向的对象。
复杂度
与
stack
大小成线性。