TSharedPtr::TSharedPtr

Aliasing constructor used to create a shared pointer which shares its reference count with another shared object, but pointing to a different object, typically a subobject.

Windows
MacOS
Linux

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/Templates/SharedPointer.h

Include

#include "Templates/SharedPointer.h"

Syntax

template<typename OtherType>
TSharedPtr
(
    TSharedRef< OtherType, Mode > const & OtherSharedRef,
    ObjectType * InObject
)

Remarks

Aliasing constructor used to create a shared pointer which shares its reference count with another shared object, but pointing to a different object, typically a subobject.

Parameters

Parameter

Description

OtherSharedRef

The shared reference whose reference count should be shared.

InObject

The object pointer to use (instead of the incoming shared pointer's object)

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss