std::istrst...~istrstream(3)
πΈ NAME πΈ
okay bestie, welcome to the std::istrst...~istrstream(3) page from the C++ Standard Libary π
this one is all about the destructor, and it's lowkey iconic.
std::istrstream::~istrstream - std::istrstream::~istrstream
β¨ Synopsis β¨
virtual ~istrstream();
so yeah, it's virtual β¨ and here's the timeline tea: deprecated in C++98, removed in C++26 π. It destroys a std::istrstream object, which also destroys the member std::strstreambuf. periodt.
π Parameters π
(none) β literally no parameters, bestie. zero. nada. π«Ά
π¦ Notes π¦
okay so the notes are giving βdon't panic about leaksβ energy: the constructors of std::istrstream do not create the underlying std::strstreambuf in dynamically allocated mode, so the memory leaks that are possible with std::ostrstream::~ostrstream or std::strstream::~strstream do not apply. slay for safety, no cap β¨
π Example π
// Run this code
#include <iostream>
#include <strstream>
int main()
{
{
std::istrstream s("1.234");
double d;
s >> d;
std::cout << d << '\n';
} // destructor called
}
π Output π
1.234
and that's the tea π this page came from http://cppreference.com, dated/versioned 2024.06.10, and it's the std::istrst...~istrstream(3) manual page. mwah π
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms