O'Reilly logo
  • Sii Sp. z o.o. PL5252352907 Al.Niepodleglosci 69, Warszawa thinks this is interesting:

Before resorting to garbage collection, systematically use resource handles: Let each resource have an owner in some scope and by default be released at the end of its owners scope. In C++, this is known as RAII (Resource Acquisition Is Initialization) and is integrated with error handling in the form of exceptions. Resources can be moved from scope to scope using move semantics or “smart pointers,” and shared ownership can be represented by “shared pointers” (§11.2.1).


Cover of A Tour of C++
  • 4. Classes
  • from A Tour of C++
  • by Bjarne Stroustrup
  • Publisher: Addison-Wesley Professional
  • Released: September 2013


RAII - Resource Acquisition Is Initialization