Skip to main content

vrtree_cpp::HRefCount

Helper structure that provides a reference count that persists between refcounted handle copies.

#include <interface_helpers.hpp>

Public Functions​

TypeName
booldec()
Decrements the reference counter. If the reference counter hits zero, this instance is deleted.
HRefCount()
HRefCount(const HRefCount & )
voidinc()
Increments the reference counter.
HRefCount &operator=(const HRefCount & )

Public Attributes​

TypeName
unsigned intrc
Reference counter.

Public Functions Documentation​

dec​

inline bool dec()

Decrements the reference counter. If the reference counter hits zero, this instance is deleted.

HRefCount​

inline HRefCount()

HRefCount​

inline HRefCount(
const HRefCount &
)

inc​

inline void inc()

Increments the reference counter.

operator=​

inline HRefCount & operator=(
const HRefCount &
)

Public Attributes Documentation​

rc​

unsigned int rc;

Reference counter.