12#ifndef ROC_CORE_REF_COUNTED_H_
13#define ROC_CORE_REF_COUNTED_H_
38template <
class T,
class AllocationPolicy>
40 protected AllocationPolicy {
44 : AllocationPolicy() {
49 : AllocationPolicy(
policy) {
70 static_cast<T&
>(
const_cast<RefCounted&
>(*
this)));
Base class for non-copyable objects.
Implementation class for reference counter.
int incref() const
Increment reference counter.
int decref() const
Decrement reference counter.
int getref() const
Get reference counter.
Base class for object with reference counter.
int getref() const
Get reference counter.
void incref() const
Increment reference counter.
RefCounted(const AllocationPolicy &policy)
Initialize.
void decref() const
Decrement reference counter.
Shared ownership intrusive pointer.
Implementation class for reference counter.