RAII and smart pointers in C++
In practice with C++, what is RAII, what are smart pointers, how are these implemented in a program and what are the benefits … Read more
In practice with C++, what is RAII, what are smart pointers, how are these implemented in a program and what are the benefits … Read more
Why is it wrong to use std::auto_ptr<> with standard containers? 6 Answers 6
Do I need to manually call close() when I use a std::ifstream? For example, in the code: std::string readContentsOfFile(std::string fileName) { std::ifstream file(fileName.c_str()); … Read more
Most people say never throw an exception out of a destructor – doing so results in undefined behavior. Stroustrup makes the point that … Read more
Does C++ support ‘finally‘ blocks? What is the RAII idiom? What is the difference between C++’s RAII idiom and C#’s ‘using’ statement? 16 … Read more
What is meant by Resource Acquisition is Initialization (RAII)? 10 Answers 10