Re:Deep C and C++ (2011)
by hackinthebochs on Wednesday October 23, 2013 @05:24PM
(#6601827)
What would a resource management class look like?
[ Parent
| on HN ]
Re:Deep C and C++ (2011)
by reverius42 on Thursday October 24, 2013 @01:04AM
(#6603497)
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 for an example.