Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/TSharedRef
Description
Returns true if this is the only shared reference to this object. Note that there may be outstanding weak references left.
IMPORTANT: This has different behavior to GetSharedReferenceCount() == 1 in a multithreaded context. The expectation is that this will be used when a user wants exclusive write-access to an otherwise-immutable object. Care still needs to be taken when pinning TWeakPtrs to make new shared references.
| Name | IsUnique |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Templates/SharedPointer.h |
| Include Path | #include "Templates/SharedPointer.h" |
bool IsUnique() const
True if there is only one shared reference to the object, and this is it!