Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/TSharedFromThis
Description
Provides a shared reference 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.
| Name | AsSharedSubobject |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Templates/SharedPointer.h |
| Include Path | #include "Templates/SharedPointer.h" |
template<typename SubobjectType>
TSharedRef < SubobjectType, Mode > AsSharedSubobject
(
SubobjectType * SubobjectPtr
) const
Returns the subobject as a shared reference.