RAII is Resource Acquisition Is Initialisation. The resource hold by the object is tie to the object’s lifetime. It will prevent resource leaks. This could be achieved by C++ Rule of Thumbs#.
Resource Acquisition Is Initialisation (RAII)
-
Resource Management
A good resource management will achieve #202202012306.
-
Lock-Guard
Lock-Guard as
std::lock_guard
in C++ standard library is a #RAII object that operates similarly with 202112061117. -
C++ Container
Containers in #202202241717 are continuous memory structures that adhere to 202202012306 principle. They possess the ownership of their own objects.