A scoped reference counting guard. More...
#include "utility.hpp"
Public Types | |
using | target_type = _T_ |
Public Member Functions | |
ref_guard (target_type &_t) | |
ref_guard (target_type &_t, const adopt_ref_t) | |
The constructor to be used with uv::adopt_ref tag. | |
ref_guard (const ref_guard &)=delete | |
ref_guard & | operator= (const ref_guard &)=delete |
ref_guard (ref_guard &&)=delete | |
ref_guard & | operator= (ref_guard &&)=delete |
A scoped reference counting guard.
Similar to std::lock_guard
but it is for reference counting. The target object should provide ref()
and unref()
public member functions.
Definition at line 280 of file utility.hpp.