Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/Templates > API/Runtime/Core/Templates/TSharedFromThis
References
| Module | Core |
| Header | /Engine/Source/Runtime/Core/Public/Templates/SharedPointer.h |
| Include | #include "Templates/SharedPointer.h" |
template<typename SubobjectType>
TWeakPtr < SubobjectType, Mode > AsWeakSubobject
(
SubobjectType * SubobjectPtr
) const
Remarks
Provides a weak pointer to a subobject of this object, i.e. points to an object which shares the lifetime and refcount of this object, but isn't derived from TSharedFromThis. Note that is only valid to call this after a shared reference (or shared pointer) to the object has already been created. Also note that it is illegal to call this in the object's destructor. Returns the subobject as a weak pointer.