class

TWeakObjectPtr

Non-owning reference to an MObject-derived type that goes nullptr when the referent is destroyed by GC.

Module
Core
Header
#include "Core/TObjectPtr.h"
Namespace
Mowo
Template
template<typename T>

Constructors

SignatureNameDescription
constexpr TWeakObjectPtr() = defaultTWeakObjectPtr
TWeakObjectPtr(T* p)TWeakObjectPtr
TWeakObjectPtr(std::nullptr_t)TWeakObjectPtr

Public functions

ReturnsNameDescription
boolIsValidValidates the captured (index, serial) against FMObjectArray's current state.
operatorbool
T*Get
T&operator*
T*operator->
voidReset
booloperator==
booloperator!=

Function details

TWeakObjectPtr

C++
constexpr TWeakObjectPtr() = default

TWeakObjectPtr

C++
TWeakObjectPtr(T* p)

TWeakObjectPtr

C++
TWeakObjectPtr(std::nullptr_t)

IsValid

C++
bool IsValid() const noexcept

Validates the captured (index, serial) against FMObjectArray's current state. After a sweep, the slot's serial bumps; this returns false even if the slot was repopulated by a new MObject (different serial). True ABA-safety.

operatorbool

C++
explicit operator bool() const noexcept

Get

C++
T* Get() const noexcept

operator*

C++
T& operator*() const

operator->

C++
T* operator->() const

Reset

C++
void Reset() noexcept

operator==

C++
bool operator==(const TWeakObjectPtr& o) const noexcept

operator!=

C++
bool operator!=(const TWeakObjectPtr& o) const noexcept
Generated from Core/TObjectPtr.h via core.json · Nov 5, 2026Version 1.0.0