Skip to content

Glossary: C++ Beyond the Basics

RAII

Also written: Resource Acquisition Is Initialization

The pattern where an object acquires a resource in its constructor and releases it in its destructor. Smart pointers, `lock_guard` and `jthread` all use it.

Where the book teaches it

Related terms

Unique pointerLock guardjthread