UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UE::GC::TReachabilityCollector< Options > Class Template Referencefinal
+ Inheritance diagram for UE::GC::TReachabilityCollector< Options >:

Public Member Functions

 TReachabilityCollector (ProcessorType &, FWorkerContext &Context)
 
virtual void HandleObjectReference (UObject *&InObject, const UObject *InReferencingObject, const FProperty *InReferencingProperty) override
 
virtual void HandleObjectReferences (UObject **InObjects, const int32 ObjectNum, const UObject *InReferencingObject, const FProperty *InReferencingProperty) override
 
virtual void AddStableReference (UObject **Object) override
 
virtual void AddStableReferenceArray (TArray< UObject * > *Objects) override
 
virtual void AddStableReferenceSet (TSet< UObject * > *Objects) override
 
virtual void AddStableReference (TObjectPtr< UObject > *Object) override
 
virtual void AddStableReferenceArray (TArray< TObjectPtr< UObject > > *Objects) override
 
virtual void AddStableReferenceSet (TSet< TObjectPtr< UObject > > *Objects) override
 
virtual bool MarkWeakObjectReferenceForClearing (UObject **WeakReference, UObject *ReferenceOwner) override
 
- Public Member Functions inherited from UE::GC::TReachabilityCollectorBase< Options >
virtual bool IsIgnoringArchetypeRef () const override final
 
virtual bool IsIgnoringTransient () const override final
 
virtual bool NeedsInitialReferences () const override final
 
virtual void AllowEliminatingReferences (bool bAllow) override final
 
virtual void SetIsProcessingNativeReferences (bool bIsNative) override final
 
virtual bool NeedsPropertyReferencer () const override final
 
- Public Member Functions inherited from FReferenceCollector
virtual COREUOBJECT_API ~FReferenceCollector ()
 
template<typename KeyType , typename ValueType , typename Allocator , typename KeyFuncs >
void AddStableReferenceMap (TMapBase< KeyType, ValueType, Allocator, KeyFuncs > &Map)
 
template<class UObjectType >
void AddStableReference (UObjectType **Object)
 
template<class UObjectType >
void AddStableReferenceArray (TArray< UObjectType * > *Objects)
 
template<class UObjectType >
void AddStableReferenceSet (TSet< UObjectType * > *Objects)
 
template<class UObjectType >
UE_FORCEINLINE_HINT void AddStableReference (TObjectPtr< UObjectType > *Object)
 
template<class UObjectType >
UE_FORCEINLINE_HINT void AddStableReferenceArray (TArray< TObjectPtr< UObjectType > > *Objects)
 
template<class UObjectType >
UE_FORCEINLINE_HINT void AddStableReferenceSet (TSet< TObjectPtr< UObjectType > > *Objects)
 
template<class UObjectType >
void AddReferencedObject (UObjectType *&Object, const UObject *ReferencingObject=nullptr, const FProperty *ReferencingProperty=nullptr)
 
template<class UObjectType >
void AddReferencedObject (const UObjectType *&Object, const UObject *ReferencingObject=nullptr, const FProperty *ReferencingProperty=nullptr)
 
template<class UObjectType >
void AddReferencedObjects (TArray< UObjectType * > &ObjectArray, const UObject *ReferencingObject=nullptr, const FProperty *ReferencingProperty=nullptr)
 
template<class UObjectType >
void AddReferencedObjects (TArray< const UObjectType * > &ObjectArray, const UObject *ReferencingObject=nullptr, const FProperty *ReferencingProperty=nullptr)
 
template<class UObjectType >
void AddReferencedObjects (TSet< UObjectType * > &ObjectSet, const UObject *ReferencingObject=nullptr, const FProperty *ReferencingProperty=nullptr)
 
template<typename KeyType , typename ValueType , typename Allocator , typename KeyFuncs >
void AddReferencedObjects (TMapBase< KeyType *, ValueType, Allocator, KeyFuncs > &Map, const UObject *ReferencingObject=nullptr, const FProperty *ReferencingProperty=nullptr)
 
template<typename KeyType , typename ValueType , typename Allocator , typename KeyFuncs >
void AddReferencedObjects (TMapBase< KeyType, ValueType *, Allocator, KeyFuncs > &Map, const UObject *ReferencingObject=nullptr, const FProperty *ReferencingProperty=nullptr)
 
template<typename KeyType , typename ValueType , typename Allocator , typename KeyFuncs >
void AddReferencedObjects (TMapBase< KeyType *, ValueType *, Allocator, KeyFuncs > &Map, const UObject *ReferencingObject=nullptr, const FProperty *ReferencingProperty=nullptr)
 
template<class UObjectType >
void AddReferencedObject (TObjectPtr< UObjectType > &Object, const UObject *ReferencingObject=nullptr, const FProperty *ReferencingProperty=nullptr)
 
template<class UObjectType >
void AddReferencedObject (TObjectPtr< const UObjectType > &Object, const UObject *ReferencingObject=nullptr, const FProperty *ReferencingProperty=nullptr)
 
template<class UObjectType >
void AddReferencedObjects (TArray< TObjectPtr< UObjectType > > &ObjectArray, const UObject *ReferencingObject=nullptr, const FProperty *ReferencingProperty=nullptr)
 
template<class UObjectType >
void AddReferencedObjects (TArray< TObjectPtr< const UObjectType > > &ObjectArray, const UObject *ReferencingObject=nullptr, const FProperty *ReferencingProperty=nullptr)
 
template<class UObjectType >
void AddReferencedObjects (TSet< TObjectPtr< UObjectType > > &ObjectSet, const UObject *ReferencingObject=nullptr, const FProperty *ReferencingProperty=nullptr)
 
template<typename KeyType , typename ValueType , typename Allocator , typename KeyFuncs >
void AddReferencedObjects (TMapBase< TObjectPtr< KeyType >, ValueType, Allocator, KeyFuncs > &Map, const UObject *ReferencingObject=nullptr, const FProperty *ReferencingProperty=nullptr)
 
template<typename KeyType , typename ValueType , typename Allocator , typename KeyFuncs >
void AddReferencedObjects (TMapBase< KeyType, TObjectPtr< ValueType >, Allocator, KeyFuncs > &Map, const UObject *ReferencingObject=nullptr, const FProperty *ReferencingProperty=nullptr)
 
template<typename KeyType , typename ValueType , typename Allocator , typename KeyFuncs >
void AddReferencedObjects (TMapBase< TObjectPtr< KeyType >, TObjectPtr< ValueType >, Allocator, KeyFuncs > &Map, const UObject *ReferencingObject=nullptr, const FProperty *ReferencingProperty=nullptr)
 
template<typename T >
void AddReferencedObject (TWeakObjectPtr< T > &P, const UObject *ReferencingObject=nullptr, const FProperty *ReferencingProperty=nullptr)
 
COREUOBJECT_API void AddReferencedObject (FWeakObjectPtr &P, const UObject *ReferencingObject=nullptr, const FProperty *ReferencingProperty=nullptr)
 
COREUOBJECT_API void AddReferencedObjects (const UScriptStruct *&ScriptStruct, void *Instance, const UObject *ReferencingObject=nullptr, const FProperty *ReferencingProperty=nullptr)
 
COREUOBJECT_API void AddReferencedObjects (TObjectPtr< const UScriptStruct > &ScriptStruct, void *Instance, const UObject *ReferencingObject=nullptr, const FProperty *ReferencingProperty=nullptr)
 
COREUOBJECT_API void AddReferencedObjects (TWeakObjectPtr< const UScriptStruct > &ScriptStruct, void *Instance, const UObject *ReferencingObject=nullptr, const FProperty *ReferencingProperty=nullptr)
 
COREUOBJECT_API void AddPropertyReferences (const UStruct *Struct, void *Instance, const UObject *ReferencingObject=nullptr)
 
COREUOBJECT_API void AddPropertyReferencesWithStructARO (const UScriptStruct *Struct, void *Instance, const UObject *ReferencingObject=nullptr)
 
COREUOBJECT_API void AddPropertyReferencesWithStructARO (const UClass *Class, void *Instance, const UObject *ReferencingObject=nullptr)
 
COREUOBJECT_API void AddPropertyReferencesLimitedToObjectProperties (const UStruct *Struct, void *Instance, const UObject *ReferencingObject=nullptr)
 
virtual void SetSerializedProperty (class FProperty *Inproperty)
 
virtual class FPropertyGetSerializedProperty () const
 
virtual bool IsProcessingNativeReferences () const
 
FReferenceCollectorArchiveGetVerySlowReferenceCollectorArchive ()
 

Friends

DispatcherTypeGetDispatcher (TReachabilityCollector< Options > &Collector, ProcessorType &, FWorkerContext &)
 

Additional Inherited Members

- Protected Member Functions inherited from UE::GC::TReachabilityCollectorBase< Options >
FORCEINLINE EKillable MayKill () const
 
- Protected Member Functions inherited from FReferenceCollector
virtual COREUOBJECT_API void HandleObjectReferences (FObjectPtr *InObjects, const int32 ObjectNum, const UObject *InReferencingObject, const FProperty *InReferencingProperty)
 
- Protected Attributes inherited from UE::GC::TReachabilityCollectorBase< Options >
bool bAllowEliminatingReferences = true
 
EOrigin CurrentOrigin = EOrigin::Other
 

Constructor & Destructor Documentation

◆ TReachabilityCollector()

template<EGCOptions Options>
UE::GC::TReachabilityCollector< Options >::TReachabilityCollector ( ProcessorType ,
FWorkerContext Context 
)
inline

Member Function Documentation

◆ AddStableReference() [1/2]

template<EGCOptions Options>
virtual void UE::GC::TReachabilityCollector< Options >::AddStableReference ( TObjectPtr< UObject > *  Object)
inlineoverridevirtual

Preferred way to add a reference that allows batching. Object must outlive GC tracing, can't be used for temporary/stack references.

Reimplemented from FReferenceCollector.

◆ AddStableReference() [2/2]

template<EGCOptions Options>
virtual void UE::GC::TReachabilityCollector< Options >::AddStableReference ( UObject **  Object)
inlineoverridevirtual

Preferred way to add a reference that allows batching. Object must outlive GC tracing, can't be used for temporary/stack references.

Reimplemented from FReferenceCollector.

◆ AddStableReferenceArray() [1/2]

template<EGCOptions Options>
virtual void UE::GC::TReachabilityCollector< Options >::AddStableReferenceArray ( TArray< TObjectPtr< UObject > > *  Objects)
inlineoverridevirtual

Preferred way to add a reference array that allows batching. Can't be used for temporary/stack array.

Reimplemented from FReferenceCollector.

◆ AddStableReferenceArray() [2/2]

template<EGCOptions Options>
virtual void UE::GC::TReachabilityCollector< Options >::AddStableReferenceArray ( TArray< UObject * > *  Objects)
inlineoverridevirtual

Preferred way to add a reference array that allows batching. Can't be used for temporary/stack array.

Reimplemented from FReferenceCollector.

◆ AddStableReferenceSet() [1/2]

template<EGCOptions Options>
virtual void UE::GC::TReachabilityCollector< Options >::AddStableReferenceSet ( TSet< TObjectPtr< UObject > > *  Objects)
inlineoverridevirtual

Preferred way to add a reference set that allows batching. Can't be used for temporary/stack set.

Reimplemented from FReferenceCollector.

◆ AddStableReferenceSet() [2/2]

template<EGCOptions Options>
virtual void UE::GC::TReachabilityCollector< Options >::AddStableReferenceSet ( TSet< UObject * > *  Objects)
inlineoverridevirtual

Preferred way to add a reference set that allows batching. Can't be used for temporary/stack set.

Reimplemented from FReferenceCollector.

◆ HandleObjectReference()

template<EGCOptions Options>
void UE::GC::TReachabilityCollector< Options >::HandleObjectReference ( UObject *&  InObject,
const UObject InReferencingObject,
const FProperty InReferencingProperty 
)
overridevirtual

Handle object reference. Called by AddReferencedObject.

Parameters
ObjectReferenced object.
ReferencingObjectReferencing object (if available).
ReferencingPropertyReferencing property (if available).

Implements FReferenceCollector.

◆ HandleObjectReferences()

template<EGCOptions Options>
void UE::GC::TReachabilityCollector< Options >::HandleObjectReferences ( UObject **  InObjects,
const int32  ObjectNum,
const UObject InReferencingObject,
const FProperty InReferencingProperty 
)
overridevirtual

Handle multiple object references. Called by AddReferencedObjects. DEFAULT IMPLEMENTATION IS SLOW as it calls HandleObjectReference multiple times. In order to optimize it, provide your own implementation.

Parameters
ObjectReferenced object.
ReferencingObjectReferencing object (if available).
ReferencingPropertyReferencing property (if available).

Reimplemented from FReferenceCollector.

◆ MarkWeakObjectReferenceForClearing()

template<EGCOptions Options>
virtual bool UE::GC::TReachabilityCollector< Options >::MarkWeakObjectReferenceForClearing ( UObject **  WeakReference,
UObject ReferenceOwner 
)
inlineoverridevirtual

Marks a specific object reference as a weak reference. This does not affect GC but will be freed at a later point The default behavior returns false as weak references must be explicitly supported

Reimplemented from FReferenceCollector.

Friends And Related Symbol Documentation

◆ GetDispatcher

template<EGCOptions Options>
DispatcherType & GetDispatcher ( TReachabilityCollector< Options > &  Collector,
ProcessorType ,
FWorkerContext  
)
friend

The documentation for this class was generated from the following file: