std::ostrstream::~ostrstream (3) - Linux Manuals
std::ostrstream::~ostrstream: std::ostrstream::~ostrstream
NAME
std::ostrstream::~ostrstream - std::ostrstream::~ostrstream
Synopsis
virtual ~ostrstream();
Destroys a std::ostrstream object, which also destroys the member std::strstreambuf, which may call the deallocation function if the underlying buffer was dynamically-allocated and not frozen.
Parameters
(none)
Notes
If str() was called on a dynamic ostrstream and freeze(false) was not called after that, this destructor leaks memory.
Example
// Run this code
Output: