FGCObjectScopeGuard

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

Windows
MacOS
Linux

Inheritance Hierarchy

FGCObject

FGCObjectScopeGuard

References

Module

CoreUObject

Header

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

Include

#include "UObject/GCObjectScopeGuard.h"

Syntax

class FGCObjectScopeGuard : public FGCObject

Remarks

Specific implementation of FGCObject that prevents a single UObject-based pointer from being GC'd while this guard is in scope.

This is the lean version of TStrongObjectPtr which uses an inline FGCObject so can't safely be used with containers that treat types as trivially relocatable.

Constructors

Name Description

Public function

FGCObjectScopeGuard

(
    const UObject* InObject
)

Public function

FGCObjectScopeGuard

(
    const FGCObjectScopeGuard&
)

Non-copyable

Destructors

Name Description

Public function Virtual

~FGCObjectScopeGuard()

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

FGCObjectSco...

 

operator=

(
    const FGCObjectScopeGuard&
)

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