class

TStrongObjectPtr

Owning handle that adds its referent to FMObjectArray's root set, so the GC can't sweep it out from under us. Use when a non-MObject holder needs to keep an MObject alive without being its Outer; an MObject reached through the Outer chain or an MPROPERTY needs no explicit root. Copyable: the root set counts, so every copy is one more owner and the object stays rooted until the last one lets go — including an owner that rooted it by hand.

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

Destroy still wins (a pending-kill root is collected, as it always was). The handle remembers the slot's serial, so after that sweep Get() answers null and letting go touches nothing, instead of reading freed memory.

Constructors

SignatureNameDescription
constexpr TStrongObjectPtr() = defaultTStrongObjectPtr
explicit TStrongObjectPtr(T* p)TStrongObjectPtr
TStrongObjectPtr(const TStrongObjectPtr& other)TStrongObjectPtr
TStrongObjectPtr(TStrongObjectPtr&& other) noexcept : m_ptr(other.m_ptr), m_inde…TStrongObjectPtr
~TStrongObjectPtr()~TStrongObjectPtr

Public functions

ReturnsNameDescription
TStrongObjectPtr&operator=
TStrongObjectPtr&operator=
T*Get
T&operator*
T*operator->
operatorbool
voidReset
T*ReleaseGive up this handle's share of the root and hand the pointer back.

Function details

TStrongObjectPtr

C++
constexpr TStrongObjectPtr() = default

TStrongObjectPtr

C++
explicit TStrongObjectPtr(T* p)

TStrongObjectPtr

C++
TStrongObjectPtr(const TStrongObjectPtr& other)

TStrongObjectPtr

C++
TStrongObjectPtr(TStrongObjectPtr&& other) noexcept : m_ptr(other.m_ptr), m_index(other.m_index), m_serial(other.m_serial)

~TStrongObjectPtr

C++
~TStrongObjectPtr()

operator=

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

operator=

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

Get

C++
T* Get() const noexcept

operator*

C++
T& operator*() const

operator->

C++
T* operator->() const

operatorbool

C++
explicit operator bool() const noexcept

Reset

C++
void Reset()

Release

C++
T* Release()

Give up this handle's share of the root and hand the pointer back. The object stays rooted only if another owner still roots it.

Generated from Core/TObjectPtr.h via core.json · Nov 5, 2026Version 1.0.0