Navigation
API > API/Runtime > API/Runtime/CoreUObject
This class provides common registration for garbage collection for non-UObject classes. It is an abstract base class requiring you to implement the AddReferencedObjects() method.
Note: FGCObject instances are not trivially relocatable, and are therefore not suited for being stored in Unreal container types by value. For example, this won't work: class FMyClass : public FGCObject {}; struct FSomeStruct { TArray
| Name | FGCObject |
| Type | class |
| Header File | /Engine/Source/Runtime/CoreUObject/Public/UObject/GCObject.h |
| Include Path | #include "UObject/GCObject.h" |
Syntax
class FGCObject
Derived Classes
FGCObject derived class hierarchy
- ConstructorHelpers::FClassFinder
- ConstructorHelpers::FObjectFinder
- ConstructorHelpers::FObjectFinderOptional
- FActorFolders
- FAnimationRecorder
- FPreviewScene
- FAnimSharingModule
- FARSupportInterface
- FARSystemProxy
- FEditorModeTools
- FAssetEditorToolkit::FGCEditingObjects
- FAsyncPoseSearchDatabasesManagement
- FSubsystemCollection
- FAvaFont::FAvaDefaultFontObjects
- FAvaPlaybackInstance
- FBaseMeshPaintComponentAdapter
- FBlueprintActionDatabase
- FBlueprintCompileReinstancer
- FBlueprintEditor
- FBlueprintNodeTemplateCache
- FCameraAssetEditorToolkit
- FCameraRigAssetEditorToolkitBase
- FCameraRigProxyAssetEditorToolkit
- FCameraRigTransitionEditorToolkitBase
- FCameraShakeAssetEditorToolkit
- FCameraShakePreviewer
- FCameraVariableCollectionEditorToolkit
- FChaosVDGeometryBuilder
- FChaosVDScene
- FChaosVDSettingsManager
- FCommonAnimationTrackEditor
- FConsoleVariablesEditorModule
- FConsolidationResults
- FContentBrowserAssetFileItemDataPayload_Creation
- FContextAssetStore
- FContextCacheElementUStruct
- FContextCacheElementUStructArray
- FEdMode
- FContextualAnimMovieSceneNotifyTrackEditor
- FContextualAnimViewModel
- FEditorViewportClient
- FDatabaseViewModel
- FDataflowNodeView
- FDataflowConnectionDrawingPolicy
- FDataflowEditorToolkit
- FDataLinkExecutor
- FDatasmithImportContext::FInternalReferenceCollector
- FDebugCanvasDrawer
- FSimpleLayerManager
- FDefaultXRLoadingScreen
- FDeferredCleanupSlateBrush
- FDMXFixturePatchSharedData
- FDMXFixtureTypeSharedData
- FDMXMVRFixtureActorLibrary
- FEditorDataStorageModule
- FEditorDuplicateDragSelection
- FEditorMoveCameraWithObject
- FEditorStateCollectionGCObject
- FFindReferencedAssets
- FFootageTakeItem
- FForceFeedbackManager
- FFractureEditorModeToolkit
- FGeomComponentCacheParametersCustomization
- FGLTFObjectArrayScopeGuard
- FGridWidget
- FImportAsyncHelper
- FImportResult
- FInteractionAssetViewModel
- FLevelEditorDragDropWorldSurrogateReferencingObject
- FLiveLinkSourcesView
- FMassEntityManager
- FMassProcessingPhaseManager
- FMediaThumbnailSection
- FMetaHumanToolkitBase
- FMetaSoundAssetManager
- FMixerDevice
- FMLDeformerEditorModel
- FMLDeformerEditorToolkit
- FNiagaraActiveCompilation
- FNiagaraEditorModule
- FNiagaraEmitterHandleViewModel
- FNiagaraEmitterViewModel
- FNiagaraScratchPadScriptViewModel
- FNiagaraSimCacheViewModel
- FNiagaraSystemInstanceController
- FNiagaraSystemViewModel
- FNiagaraTypeRegistry
- FNiagaraWorldManager
- FObjectMixerEditorList
- FOpenColorIODisplayExtension
- FOptimusDataTypeRegistry
- FPackageMigrationContext
- FParticleSystemWorldManager
- FPCGEditor
- FPreLoadSettingsContainerBase
- FPromotedFilterContainer
- FReimportManager
- FRemoteSessionARCameraChannel
- FRepLayout
- FRigVMNewEditor
- FRigVMRegistry_NoLock
- FSceneStateTaskDescRegistry
- FSequenceDirectorPlaybackCapability::FDirectorInstanceCache
- FSequencerKeyStructGenerator
- FSKMClothingSimulation
- FSlateDrawBuffer
- FSlateGameResources
- FSlateInvalidationRoot
- FSmartObjectAssetToolkit
- FSMInstanceElementIdMap
- FSoundSourceDecoder
- FSoundWavePCMLoader
- FStandaloneCompositeFont
- FStreamableManager
- FSystemInterrogator
- FTG_InstanceImpl
- FTG_PinSelectionManager
- FTransactionManager
- FUMGDragDropOp
- FVariantManager
- FViewport::FHitProxyMap
- FVoiceEngineImpl::FVoiceSerializeHelper
- FWaveformEditor
- FWidget
- FWorldCookPackageSplitter
- FWorldGridPreviewer
- FWorldRenderCapture
- FWorldTickHook::FInternalGCObject
- IWorkspaceViewportController::FViewportContext
- SABImage
- SColorGradingWheel
- SCurveEditor
- SDataflowEdNode
- SDataflowGraphEditor
- SDesignerView
- SDMXReadOnlyFixturePatchList
- SGeometryMaskCanvasPreview
- SMediaImage::FInternalReferenceCollector
- SMeshWidget
- SMetaHumanVideoBaseLiveLinkSubjectMonitorWidget
- SNiagaraScriptInputPreviewPanel
- SObjectWidget
- SRigVMDetailsInspector
- STextureGraphInsightBlobView
- STextureGraphInsightDeviceBufferView
- TContextCacheElementUObject
- TContextCacheElementUObjectArray
- TGCObjectScopeGuard
- TGCObjectsScopeGuard
- TPartyDataReplicator
- TWidgetFactory
- UDatasmithSceneElementBase::FDatasmithSceneCollector
- UDerivedDataCacheCommandlet::FObjectReferencer
- FGeomObject
- FGoogleARCorePassthroughCameraRenderer
- FGraphSelectionManager
- FIKRetargetBoneDetailCustomization
- FIKRetargetEditorController
- FIKRigEditorController
- FLandscapeBrush
- FLandscapeTool
- FPhysicsControlAssetEditor
- FProceduralRetargetAssets
- FQosInterface
- FTraceSourceFiltering
- SExportTrajectoriesWindow
- SGraphActionMenu
- SGraphPanel
- SGroomEditorViewport
- SIKRetargetChainMapList
- SKismetInspector
- SSceneOutliner
- SRetargetAnimAssetsWindow
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FGCObject () |
Tells the global object that forwards AddReferencedObjects calls on to objects that a new object is requiring AddReferencedObjects call. | UObject/GCObject.h | |
| UObject/GCObject.h | |||
| UObject/GCObject.h | |||
| UObject/GCObject.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~FGCObject() |
UObject/GCObject.h |
Enums
Public
| Name | Remarks |
|---|---|
| EFlags |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| GGCObjectReferencer | UGCObjectReferencer * | The static object referencer object that is shared across all garbage collectible non-UObject objects. | UObject/GCObject.h |
| UnknownGCObjectName | const TCHAR * | UObject/GCObject.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bCanMakeInitialReferences | const bool | UObject/GCObject.h | ||
| bReferenceAdded | bool | UObject/GCObject.h | ||
| UGCObjectReferencer | friend | UObject/GCObject.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddReferencedObjects
(
FReferenceCollector& Collector |
Pure virtual that must be overloaded by the inheriting class. | UObject/GCObject.h | |
FString GetReferencerName() |
Overload this method to report a name for your referencer | UObject/GCObject.h | |
| Overload this method to report how the specified object is referenced, if necessary | UObject/GCObject.h | ||
void RegisterGCObject() |
Register with GC, only needed if constructed with EFlags::RegisterLater or after unregistering | UObject/GCObject.h | |
void UnregisterGCObject() |
Unregister ahead of destruction. Safe to call multiple times. | UObject/GCObject.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static void StaticInit() |
Initializes the global object referencer and adds it to the root set. | UObject/GCObject.h |