template<typename TOwnable>
class alib::lang::Owner< TOwnable >
Ensures that an object of template type TOwnable is acquired and properly released when unwinding the stack. This class is meant to be allocated only on the stack and not on the heap. Therefore, the new operators as well as copy and move constructors and assignment operators are declared private.
With debug-builds, the constructor expects caller source information parameters of type CallerInfo. Use macro ALIB_CALLER_PRUNED to prune those with release-builds.
- See also
-
- Template Parameters
-
TOwnable | The type to own. Requirements are to have methods Acquire and Release available. |
Definition at line 48 of file owner.hpp.