Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/TWeakObjectPtr
Overloads
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TStrongObjectPtr< T > TryPin
(
bool& bOutPinValid |
Pin the weak pointer as a strong ptr. | UObject/WeakObjectPtrTemplates.h | |
TStrongObjectPtr< T > TryPin
(
bool& bOutPinValid, |
Pin the weak pointer and get a strongptr. | UObject/WeakObjectPtrTemplates.h |
TryPin(bool &)
Description
Pin the weak pointer as a strong ptr. This is an optimized version implying bEvenIfPendingKill=false.
| Name | TryPin |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/UObject/WeakObjectPtrTemplates.h |
| Include Path | #include "UObject/WeakObjectPtrTemplates.h" |
TStrongObjectPtr < T > TryPin
(
bool & bOutPinValid
) const
TryPin(bool &, bool)
Description
Pin the weak pointer and get a strongptr.
| Name | TryPin |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/UObject/WeakObjectPtrTemplates.h |
| Include Path | #include "UObject/WeakObjectPtrTemplates.h" |
TStrongObjectPtr < T > TryPin
(
bool & bOutPinValid,
bool bEvenIfPendingKill
) const
nullptr if this object is gone or the weak pointer is explicitly null, otherwise a valid uobject pointer
Parameters
| Name | Remarks |
|---|---|
| bOutPinValid | true if garbage collection was not in progress, and OutResult was successfully captured, false if garbage collection was in progress and OutResult was not captured |
| bEvenIfPendingKill | if this is true, pendingkill objects are considered valid |