TSharedRef::TSharedRef

NOTE: [TSharedRef](API\Runtime\Core\Templates\TSharedRef) has no default constructor as it does not support empty references.

Windows
MacOS
Linux

References

Module

Core

Header

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

Include

#include "Templates/SharedPointer.h"

Syntax

template<typename OtherType, typename>
TSharedRef
(
    OtherType * InObject
)

Remarks

NOTE: TSharedRef has no default constructor as it does not support empty references. You must initialize your TSharedRef to a valid object at construction time. Constructs a shared reference that owns the specified object. Must not be nullptr.

Parameters

Parameter

Description

InObject

Object this shared reference to retain a reference to

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