Navigation
Unreal Engine C++ API Reference > Runtime > Core > Templates > TWeakPtr > Pin
References
Module | Core |
Header | /Engine/Source/Runtime/Core/Public/Templates/SharedPointer.h |
Include | #include "Templates/SharedPointer.h" |
TSharedPtr< ObjectType, Mode > Pin&40;&41; const
Remarks
Converts this weak pointer to a shared pointer that you can use to access the object (if it hasn't expired yet.) Remember, if there are no more shared references to the object, the returned shared pointer will not be valid. You should always check to make sure the returned pointer is valid before trying to dereference the shared pointer! Shared pointer for this object (will only be valid if still referenced!)