Garbage Collection
Raw C & C++ Heap Allocation
Manual Memory Management
![Heap Allocation](/assets/HeapAllocation.B1iETNtj.png)
Reference Counting (Smart Pointers)
Automatic Memory Management
![Reference Counting](/assets/ReferenceCounting.DyP5mCV8.png)
Usefull GC Commands
- Useful for debugging crashes and stress tests
sh
gc.ForceCollectGarbageEveryFrame
- Logs all UObjects in the Root Set
sh
ListRootSetObjects
- Logs unreleased garbage objects Set to 2 to do dump a sample
sh
gc.GarbageReferenceTrackingEnabled
- Small summery of cluster
sh
gc.ListClusters