std::strstreambuf::~strstreambuf (3) - Linux Man Pages
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.
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.
// Run this code