std::set<Key,Compare,Allocator>::~set

来自cppreference.com
< cpp‎ | container‎ | set
 
 
 
 
~set();
(C++26 起为 constexpr)

销毁 set。调用各元素的析构函数,然后解分配所用的存储。

[编辑] 复杂度

*this 的大小成线性。

[编辑] 注解

如果元素是指针,那么不会销毁所指向的对象。