RAII (Resource Acquisition Is Initialization) is the core of C++ idiom. It is about the process and idea of how the object cleans up happens after itself and how a resource belongs to an object lifetime. Why it’s needed anyway, it’s because manually managing resources is easy to get wrong.