Navigation
API > API/Runtime > API/Runtime/CoreUObject
Description
Deletes all unreferenced objects, keeping objects that have any of the passed in KeepFlags set. Will wait for other threads to unlock GC.
| Name | CollectGarbage |
| Type | function |
| Header File | /Engine/Source/Runtime/CoreUObject/Public/UObject/UObjectGlobals.h |
| Include Path | #include "UObject/UObjectGlobals.h" |
| Source | /Engine/Source/Runtime/CoreUObject/Private/UObject/GarbageCollection.cpp |
void CollectGarbage
(
EObjectFlags KeepFlags,
bool bPerformFullPurge
)
Parameters
| Name | Remarks |
|---|---|
| KeepFlags | objects with those flags will be kept regardless of being referenced or not |
| bPerformFullPurge | if true, perform a full purge after the mark pass |