Navigation
API > API/Runtime > API/Runtime/CoreUObject
Garbage Collector History. Holds snapshots of a number of previous GC runs.
| Name | FGCHistory |
| Type | class |
| Header File | /Engine/Source/Runtime/CoreUObject/Public/UObject/GarbageCollectionHistory.h |
| Include Path | #include "UObject/GarbageCollectionHistory.h" |
Syntax
class FGCHistory
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~FGCHistory() |
UObject/GarbageCollectionHistory.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| GCBarrier | UObject * | Object representing GC barrier | UObject/GarbageCollectionHistory.h | |
| MostRecentSnapshotIndex | int32 | Index of the last recorded snapshot in the Snapshots array | UObject/GarbageCollectionHistory.h | |
| Snapshots | TArray< FGCSnapshot > | Captured snapshots of previous GC runs. This is essentially a preallocated ring buffer. | UObject/GarbageCollectionHistory.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void Cleanup () |
Frees memory allocated by GC history. | UObject/GarbageCollectionHistory.h | |
int64 GetAllocatedSize() |
Returns the number of bytes allocated by GC history | UObject/GarbageCollectionHistory.h | |
UObject * GetBarrierObject() |
Returns an object representing GC Barrier | UObject/GarbageCollectionHistory.h | |
int32 GetHistorySize() |
UObject/GarbageCollectionHistory.h | ||
FGCSnapshot * GetLastSnapshot() |
Returns the snapshot of the last GC run. See GetSnapshot(int32) | UObject/GarbageCollectionHistory.h | |
FGCSnapshot * GetSnapshot
(
int32 HistoryLevel |
Gets a snapshot of a previous GC run. | UObject/GarbageCollectionHistory.h | |
bool IsActive() |
UObject/GarbageCollectionHistory.h | ||
void SetHistorySize
(
int32 HistorySize |
Sets how many GC runs the history can record. | UObject/GarbageCollectionHistory.h | |
void Update
(
TConstArrayView< TUniquePtr< UE::GC::FWorkerContext > > Contexts |
Copies information generated by Garbage Collector into the next snapshot struct. | UObject/GarbageCollectionHistory.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static FGCHistory & Get() |
Gets the FGCHistory singleton. | UObject/GarbageCollectionHistory.h |