Navigation
API > API/Runtime > API/Runtime/CoreUObject > API/Runtime/CoreUObject/FWeakObjectPtr
Overloads
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TStrongObjectPtr< UObject > TryPin
(
bool& bOutPinValid |
Attempt to get a strong object ptr to the weak pointer, but only if garbage collection is not in progress. | UObject/WeakObjectPtr.h | |
TStrongObjectPtr< UObject > TryPin
(
bool& bOutPinValid, |
Attempt to get a strong object ptr to the weak pointer, but only if garbage collection is not in progress. | UObject/WeakObjectPtr.h |
TryPin(bool &)
Description
Attempt to get a strong object ptr to the weak pointer, but only if garbage collection is not in progress. This is an optimized version implying bEvenIfGarbage=false.
| Name | TryPin |
| Type | function |
| Header File | /Engine/Source/Runtime/CoreUObject/Public/UObject/WeakObjectPtr.h |
| Include Path | #include "UObject/WeakObjectPtr.h" |
| Source | /Engine/Source/Runtime/CoreUObject/Private/UObject/WeakObjectPtr.cpp |
TStrongObjectPtr < UObject > TryPin
(
bool & bOutPinValid
) const
TStrongObjectPtr will be invalid if this object is gone or the weak pointer is explicitly null, otherwise a valid TStrongObjectPtr
Parameters
| Name | Remarks |
|---|---|
| bOutPinValid | will be true if the pin attempt was successful, and false if it was blocked by garbage collection |
TryPin(bool &, bool)
Description
Attempt to get a strong object ptr to the weak pointer, but only if garbage collection is not in progress.
| Name | TryPin |
| Type | function |
| Header File | /Engine/Source/Runtime/CoreUObject/Public/UObject/WeakObjectPtr.h |
| Include Path | #include "UObject/WeakObjectPtr.h" |
| Source | /Engine/Source/Runtime/CoreUObject/Private/UObject/WeakObjectPtr.cpp |
TStrongObjectPtr < UObject > TryPin
(
bool & bOutPinValid,
bool bEvenIfGarbage
) const
TStrongObjectPtr will be invalid if this object is gone or the weak pointer is explicitly null, otherwise a valid TStrongObjectPtr
Parameters
| Name | Remarks |
|---|---|
| bEvenIfGarbage | if this is true, Garbage objects are considered valid |
| bOutPinValid | will be true if the pin attempt was successful, and false if it was blocked by garbage collection |