TStrongObjectPtr

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

References

Module

CoreUObject

Header

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

Include

#include "UObject/StrongObjectPtr.h"

Syntax

template<typename ObjectType>
class TStrongObjectPtr

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 "full-fat" version of FGCObjectScopeGuard which uses a heap-allocated FGCObject so can safely be used with containers that treat types as trivially relocatable.

Constructors

Name Description

Public function

TStrongObjectPtr

(
    TStrongObjectPtr&& InOther
)

Public function

TStrongObjectPtr

(
    TYPE_OF_NULLPTR
)

Public function

TStrongObjectPtr

(
    ObjectType* InObject
)

Public function

TStrongObjectPtr

(
    const TStrongObjectPtr& InOther
)

Public function

TStrongObjectPtr

(
    const TStrongObjectPtr< OtherObject...
)

Destructors

Name Description

Public function

~TStrongObjectPtr()

Functions

Name Description

Public function Const

ObjectType &...

 

Get()

Public function Const

bool

 

IsValid()

Public function

void

 

Reset

(
    ObjectType* InNewObject
)

Operators

Name Description

Public function Const

 

operator bool()

Public function Const

ObjectType &

 

operator*()

Public function

TStrongObjec...

 

operator=

(
    TStrongObjectPtr&& InOther
)

Public function

TStrongObjec...

 

operator=

(
    const TStrongObjectPtr& InOther
)

Public function

TStrongObjec...

 

operator=

(
    const TStrongObjectPtr< OtherObject...
)

Public function Const

ObjectType &...

 

operator->()

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