What is meant by Resource Acquisition is Initialization (RAII)?
There are three parts to an RAII class:
RAII stands for "Resource Acquisition is initialization." The "resource acquisition" part of RAII is where you begin something that must be ended later, such as:
The "is initialization" part means that the acquisition happens inside the constructor of a class.
https://www.tomdalling.com/blog/software-design/resource-acquisition-is-initialisation-raii-explained/