Skip to content

Glossary: C++ Basics

RAII

Also written: Resource Acquisition Is Initialization

The idea that an object takes a resource, such as an open file, in its constructor and gives it back in its destructor. File streams, strings and vectors work this way, so they clean up even during an error.

Where the book teaches it

Related terms

DestructorStack unwindingMemory leak