Understanding RAII

We can go one step further than simple destructors. We can create structs that can give the user temporary access to some resource or functionality and automatically revoke it again when the user is done. This concept is called RAII, which stands for Resource Acquisition Is Initialization. Or, in other words, the validity of a resource is tied to the lifetime of a variable.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.12.136.186