Ue Memory And Gc

Manage UObject lifetime and plain C++ memory in Unreal Engine. Covers the garbage collector reachability cycle and root set, keeping UObjects alive with UPROPERTY and TObjectPtr, non-owning TWeakObjectPtr, path-only TSoftObjectPtr, TStrongObjectPtr for non-UObject owners, FGCObject::AddReferencedObjects, AddToRoot/RemoveFromRoot, MarkAsGarbage and IsValid checks, and the non-UObject smart pointers TSharedPtr/TSharedRef/TWeakPtr/TUniquePtr and MakeShared. Use when choosing a pointer or ownership type, debugging crashes after garbage collection, investigating dangling pointer or use-after-free bugs, holding UObjects from non-UObject classes, or picking between TSharedPtr and TUniquePtr for plain C++ objects.

kevinpbuckley Updated 605 repo stars

File contents

kevinpbuckley/unreal-engine-skills/tree/main/skills/core/ue-memory-and-gc commit 5d0c092247

Frequently asked questions

npx skillmds@latest add kevinpbuckley/ue-memory-and-gc