TGCObjectsScopeGuard

Specific implementation of [FGCObject](API\Runtime\CoreUObject\UObject\FGCObject) that prevents an array of UObject-based pointers from being GC'd while this guard is in scope.

Windows
MacOS
Linux

Inheritance Hierarchy

FGCObject

TGCObjectsScopeGuard

References

Module

CoreUObject

Header

/Engine/Source/Runtime/CoreUObject/Public/UObject/GCObjectScopeGuard.h

Include

#include "UObject/GCObjectScopeGuard.h"

Syntax

template<typename ObjectType>
class TGCObjectsScopeGuard : public FGCObject

Remarks

Specific implementation of FGCObject that prevents an array of UObject-based pointers from being GC'd while this guard is in scope.

Constructors

Name Description

Public function

TGCObjectsScopeGuard

(
    const TArray< ObjectType* >& ...
)

Public function

TGCObjectsScopeGuard

(
    const TGCObjectsScopeGuard&
)

Non-copyable

Destructors

Name Description

Public function Virtual

~TGCObjectsScopeGuard()

Overridden from FGCObject

Name Description

Public function Virtual

void

 

AddReferencedObjects

(
    FReferenceCollector& Collector
)

Pure virtual that must be overloaded by the inheriting class.

Public function Virtual Const

FString

 

GetReferencerName()

Use this method to report a name for your referencer.

Operators

Name Description

Public function

TGCObjectsSc...

 

operator=

(
    const TGCObjectsScopeGuard&
)

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss