std::basic_string<CharT,Traits,Allocator>::~basic_string
From cppreference.com
 
 
 < cpp | string | basic string 
 
 
 C++ 
 Feature test macros (C++20)
 Concepts library (C++20)
 Metaprogramming library (C++11)
 Ranges library (C++20)
 Filesystem library (C++17)
 Concurrency support library (C++11)
 Execution control library (C++26)
std::basic_string 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
basic_string::~basic_string
(C++23)
  (DR*)
(DR*)
(C++23)
(DR*)
(C++23)
(C++23)
(C++20)
(C++20)
(C++23)
(C++20)(C++20)
(until C++20)(until C++20)(until C++20)(until C++20)(until C++20)(C++20)
(C++11)(C++11)(C++11)
(C++11)(C++11)
 (C++14)
(C++11)
 Deduction guides (C++17)
~basic_string();
 
 (constexpr since C++20)
Destructs the basic_string. The destructors of the elements are called and the used storage is deallocated.
[edit] Complexity
Typically constant (formally linear).