The C++ set destructor is responsible for removing all elements within the set container and releasing all allocated memory resources utilized by the set container.
Syntax
Example
~set();
Parameter
Return value
Complexity
Linear in set::size (destructors).
Iterator validity
All iterators, references, and pointers become invalid.
Data Races
The collection set and each of its items are altered.
Exception Safety
This function never throws exceptions.