chsvlib
chsv helper source code

◆ reset() [2/2]

void reset ( handle_rref  rrHandle = handle_type())

Closes the resource currently managed by the AutoResource (if any) and takes ownership of rrHandle.

Parameters
rrHandleis an rvalue reference to a handle passed using move semantics. The handle describes the resource whose ownership is taken over by the object. Generally, this handle should not be already managed by any other managing mechanism (i.e., this value should not come from calling member get on a managed resources).
Remarks
If rrHandle is a default handle (i.e. value-initialized handle), the AutoResource becomes empty, managing no resource after the call.
To release the ownership of the managed resource without closing it, use member function release instead.