std::strstreambuf::~strstreambuf (3) - Linux Manuals
std::strstreambuf::~strstreambuf: std::strstreambuf::~strstreambuf
NAME
std::strstreambuf::~strstreambuf - std::strstreambuf::~strstreambuf
Synopsis
virtual ~strstreambuf();
Destroys a std::strstreambuf object. if the object is managing a dynamically-allocated buffer (the buffer state is "allocated") and if the object is not frozen, then deallocates the buffer using the deallocation function provided at construction or delete[] if none was provided.
Parameters
(none)
Notes
This destructor is typically called by the destructor of std::strstream
If str() was called on a dynamic strstream and freeze(false) was not called after that, this destructor leaks memory.
Example
// Run this code
Output: