| I/O manipulators | ||||
| Print functions(C++23) | ||||
| C-style I/O | ||||
| Buffers | ||||
(C++23) | ||||
(C++98/26*) | ||||
(C++20) | ||||
| Streams | ||||
| Abstractions | ||||
| File I/O | ||||
| String I/O | ||||
| Array I/O | ||||
(C++23) | ||||
(C++23) | ||||
(C++23) | ||||
(C++98/26*) | ||||
(C++98/26*) | ||||
(C++98/26*) | ||||
| Synchronized Output | ||||
(C++20) | ||||
| Types | ||||
| Error category interface | ||||
(C++11) | ||||
(C++11) |
| Member functions | ||||
istrstream::~istrstream | ||||
virtual ~istrstream(); | (deprecated in C++98) (removed in C++26) | |
Destroys astd::istrstream object, which also destroys the memberstd::strstreambuf.
(none)
The constructors ofstd::istrstream do not create the underlyingstd::strstreambuf in dynamically allocated mode, so the memory leaks that are possible withstd::ostrstream::~ostrstream orstd::strstream::~strstream do not apply.
#include <iostream>#include <strstream> int main(){{std::istrstream s("1.234");double d; s>> d;std::cout<< d<<'\n';}// destructor called}
Output:
1.234