class TSharedCommon

template<typename Type, ThreadSafetyPolicy ThreadSafety = ThreadSafe>

Base class class for TShared/TWeak.

Public

Methods

GetReferenceCount

u32 GetReferenceCount() const

Returns the number of strong references held by the pointer.

Get

Type *Get() const

Returns the underlying object.

Protected

Methods

~TSharedCommon<Type, ThreadSafety>

~TSharedCommon<Type, ThreadSafety>() = default

IncrementStrongReferenceCount

void IncrementStrongReferenceCount() const

Increments the strong reference count.

DecrementStrongReferenceCount

void DecrementStrongReferenceCount() const

Decrements the strong reference count, and releases the object if count is zero.

IncrementWeakReferenceCount

void IncrementWeakReferenceCount() const

Increments the weak reference count.

DecrementWeakReferenceCount

void DecrementWeakReferenceCount() const

Decrements the weak reference count, and releases the control block if the count is zero.

Swap

void Swap(TSharedCommon<Type, ThreadSafety> &other)

Fields

mOwnedObject

Type * mOwnedObject

mControlBlock

TSharedControlBlock<ThreadSafety> * mControlBlock