By Andrey_Karpov_2009
via rmartinho.github.com
Submitted: Nov 23 2012 / 07:06
In C++ the destructors of objects with automatic storage duration are invoked whenever their scope ends. This property is often used to handle cleanup of resources automatically in a pattern known by the not very descriptive name RAII. An essential part of RAII is the concept of resource ownership: the object responsible for cleaning up a resource in its destructor owns that resource. Proper ownership policies are the secret to avoid resource leaks.
Add your comment