Namespaces
Variants

std::list<T,Allocator>::~list

来自 zh.cppreference.net

 
 
 
 
~list();
(constexpr 自C++26起)

销毁列表。调用元素的析构函数(顺序未指定),并释放动态分配的存储(如果有)。注意,如果元素是指针,则不会销毁所指向的对象。

复杂度

线性于 * this 的大小。