class

Ref

Intrusive ref-counted pointer; T must derive from RefCounted

Module
Arc
Header
#include "Arc/Core/ArcMemory.h"
Namespace
Arcf
Template
template<typename T>

Constructors

SignatureNameDescription
Ref() : m_ptr(nullptr)Ref
Ref(T* ptr) : m_ptr(ptr)Ref
Ref(const Ref& other) : m_ptr(other.m_ptr)Ref
Ref(Ref&& other) noexcept : m_ptr(other.m_ptr)Ref
template<typename U> Ref(const Ref<U>& other) : m_ptr(other.Get())Ref
template<typename U> Ref(Ref<U>&& other) noexcept : m_ptr(other.Get())Ref
~Ref()~Ref

Public functions

Function details

Ref

C++
Ref() : m_ptr(nullptr)

Ref

C++
Ref(T* ptr) : m_ptr(ptr)

Ref

C++
Ref(const Ref& other) : m_ptr(other.m_ptr)

Ref

C++
Ref(Ref&& other) noexcept : m_ptr(other.m_ptr)

Ref

C++
template<typename U> Ref(const Ref<U>& other) : m_ptr(other.Get())

Ref

C++
template<typename U> Ref(Ref<U>&& other) noexcept : m_ptr(other.Get())

~Ref

C++
~Ref()

operator=

C++
Ref& operator=(const Ref& other)

operator=

C++
Ref& operator=(Ref&& other) noexcept

operator=

C++
Ref& operator=(std::nullptr_t)

operator->

C++
T* operator->() const

operator*

C++
T& operator*() const

operatorbool

C++
explicit operator bool() const

Get

C++
T* Get() const

Reset

C++
void Reset()

Create

C++
template<typename... Args> static Ref Create(Args&&... args)

operator==

C++
bool operator==(const Ref& other) const

operator!=

C++
bool operator!=(const Ref& other) const

operator==

C++
bool operator==(std::nullptr_t) const

operator!=

C++
bool operator!=(std::nullptr_t) const
Generated from Arc/Core/ArcMemory.h via arc.json · Nov 5, 2026Version 1.0.0