3 ms·
It has a constructor (to initialize the resource), a destructor (to release the resource), copy/move constructors, and lets you get access to the underlying res
by reverius42 13y ago
It has a constructor (to initialize the resource), a destructor (to release the resource), copy/move constructors, and lets you get access to the underlying resource. See http://en.cppreference.com/w/cpp/memory/shared_ptr http://en.cppreference.com/w/cpp/memory/shared_ptr for an example.