3 ms·
What would a resource management class look like?
by hackinthebochs 13y ago
What would a resource management class look like?
- reverius42 13y agoIt 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.