class

MObject

Module
Core
Header
#include "Core/MObject.h"
Namespace
Mowo

Constructors

SignatureNameDescription
MObject()MObject
virtual ~MObject()~MObject
MObject(const MObject&) = deleteMObjectCopy and move are deleted because MObjects have identity; subclasses that really mean value semantics opt in explicitly.
MObject(MObject&&) = deleteMObject

Public functions

ReturnsNameDescription
MObject&operator=
MObject&operator=
FNameGetNameDefaults to the class name when not set.
voidSetName
MObject*GetOuterEvery MObject has an Outer that owns it (typically the world, or another MObject for nested types).
voidSetOuter
class MClass*GetClassResolves the concrete type via typeid(*this) against MClassRegistry, which MHT populates at static-init time — so subclasses get the right MClass without overriding.
uint32_tGetObjectIndexStable slot index in FMObjectArray.
voidMarkPendingKillDeferred destruction: the object stays allocated until the next GC pass (no dangling raw pointers mid-frame), but is dead to the world immediately — TWeakObjectPtr::IsValid goes false and the mark phase refuses to mark it (so the sweep collects it regardless of who still references it).
boolIsPendingKill
boolIsPurgedByUnloadKilled because the module holding its code unloaded (FMObjectArray::PurgeModuleObjects).

Function details

MObject

C++
MObject()

~MObject

C++
virtual ~MObject()

MObject

C++
MObject(const MObject&) = delete

Copy and move are deleted because MObjects have identity; subclasses that really mean value semantics opt in explicitly.

MObject

C++
MObject(MObject&&) = delete

operator=

C++
MObject& operator=(const MObject&) = delete

operator=

C++
MObject& operator=(MObject&&) = delete

GetName

C++
FName GetName() const

Defaults to the class name when not set.

SetName

C++
void SetName(FName name)

GetOuter

C++
MObject* GetOuter() const

Every MObject has an Outer that owns it (typically the world, or another MObject for nested types). GC traces the Outer chain to find roots.

SetOuter

C++
void SetOuter(MObject* outer)

GetClass

C++
virtual class MClass* GetClass() const

Resolves the concrete type via typeid(*this) against MClassRegistry, which MHT populates at static-init time — so subclasses get the right MClass without overriding. Out-of-line in MObject.cpp so the lookup doesn't drag MClassRegistry.h into every consumer.

GetObjectIndex

C++
uint32_t GetObjectIndex() const noexcept

Stable slot index in FMObjectArray. Set by Register on construction; never changes for this object's lifetime. TWeakObjectPtr captures (m_objectIndex, captureSerial) so it can detect a swept-and-replaced slot.

MarkPendingKill

C++
void MarkPendingKill() noexcept

Deferred destruction: the object stays allocated until the next GC pass (no dangling raw pointers mid-frame), but is dead to the world immediately — TWeakObjectPtr::IsValid goes false and the mark phase refuses to mark it (so the sweep collects it regardless of who still references it).

IsPendingKill

C++
bool IsPendingKill() const noexcept

IsPurgedByUnload

C++
bool IsPurgedByUnload() const noexcept

Killed because the module holding its code unloaded (FMObjectArray::PurgeModuleObjects). The next mark clears every TObjectPtr that still names it, before the sweep frees it: unlike an ordinary pending kill, nothing can ever safely read it again — its vtable is unmapped memory.

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