Module |
|
Header |
/Engine/Source/Runtime/Core/Public/Templates/SharedPointer.h |
Include |
#include "Templates/SharedPointer.h" |
template<class ObjectType, ESPMode Mode>
class TWeakPtr
TWeakPtr is a non-intrusive reference-counted weak object pointer. This weak pointer will be conditionally thread-safe when the optional Mode template argument is set to ThreadSafe.
Name | Description | |
---|---|---|
|
TWeakPtr ( |
Constructs an empty TWeakPtr |
|
TWeakPtr ( |
Constructs a weak pointer from a shared reference |
|
TWeakPtr ( |
Constructs a weak pointer from a shared pointer |
|
TWeakPtr |
Constructs a weak pointer from a weak pointer of another type. |
|
TWeakPtr |
|
|
TWeakPtr ( |
|
|
TWeakPtr ( |
Name | Description | ||
---|---|---|---|
|
HasSameObject ( |
Returns true if the object this weak pointer points to is the same as the specified object pointer. |
|
|
const bool |
IsValid() |
Checks to see if this weak pointer actually has a valid reference to an object |
|
TSharedPtr< ... |
Pin() |
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. |
|
TSharedPtr< ... |
Pin() |
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. |
|
Reset() |
Resets this weak pointer, removing a weak reference to the object. |
Name | Description | ||
---|---|---|---|
|
TWeakPtr & |
operator= ( |
Assignment operator sets this weak pointer from a shared reference |
|
TWeakPtr & |
operator= |
|
|
TWeakPtr & |
operator= |
Assignment operator adds a weak reference to the object referenced by the specified weak pointer. |
|
TWeakPtr & |
operator= ( |
Assignment operator sets this weak pointer from a shared pointer |
|
TWeakPtr & |
operator= ( |
Assignment operator adds a weak reference to the object referenced by the specified weak pointer |
|
TWeakPtr & |
operator= ( |
Assignment to a nullptr pointer. Clears this weak pointer's reference. |
|
TWeakPtr & |
operator= ( |
Name |
Description |
---|---|
ElementType |