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
| Signature | Name | Description |
|---|---|---|
constexpr TWeakObjectPtr() = default | TWeakObjectPtr | |
TWeakObjectPtr(T* p) | TWeakObjectPtr | |
TWeakObjectPtr(std::nullptr_t) | TWeakObjectPtr |
Public functions
| Returns | Name | Description |
|---|---|---|
bool | IsValid | Validates the captured (index, serial) against FMObjectArray's current state. |
operatorbool | ||
T* | Get | |
T& | operator* | |
T* | operator-> | |
void | Reset | |
bool | operator== | |
bool | operator!= |
Function details
TWeakObjectPtr
C++
constexpr TWeakObjectPtr() = defaultTWeakObjectPtr
C++
TWeakObjectPtr(T* p)TWeakObjectPtr
C++
TWeakObjectPtr(std::nullptr_t)IsValid
C++
bool IsValid() const noexceptValidates 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 noexceptGet
C++
T* Get() const noexceptoperator*
C++
T& operator*() constoperator->
C++
T* operator->() constReset
C++
void Reset() noexceptoperator==
C++
bool operator==(const TWeakObjectPtr& o) const noexceptoperator!=
C++
bool operator!=(const TWeakObjectPtr& o) const noexceptGenerated from Core/TObjectPtr.h via core.json · Nov 5, 2026Version 1.0.0