TSharedRef::TSharedRef

Constructs a shared reference that owns the specified object. Must not be nullptr.

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 DeleterType, typename>
TSharedRef
(
    OtherType * InObject,
    DeleterType && InDeleter
)

Remarks

Constructs a shared reference that owns the specified object. Must not be nullptr.

Parameters

Parameter

Description

InObject

Object this shared pointer to retain a reference to

InDeleter

Deleter object used to destroy the object when it is no longer referenced.

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