TUniquePtr< T[], Deleter >

Windows
MacOS
Linux

Inheritance Hierarchy

Deleter

TUniquePtr< T[], Deleter >

References

Module

Core

Header

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

Include

#include "Templates/UniquePtr.h"

Syntax

template<typename T, typename Deleter>
class TUniquePtr< T[], Deleter > : private Deleter

Functions

Name Description

Public function

 

~TUniquePtr()

Destructor

Public function Const

T *

 

Get()

Returns a pointer to the owned array without relinquishing ownership.

Public function

Deleter &

 

GetDeleter()

Returns a reference to the deleter subobject.

Public function Const

const Delete...

 

GetDeleter()

Returns a reference to the deleter subobject.

Public function Const

bool

 

IsValid()

Tests if the TUniquePtr currently owns an array.

Public function

T *

 

Release()

Relinquishes control of the owned array to the caller and nulls the TUniquePtr.

Public function

void

 

Reset

(
    U* InPtr
)

Gives the TUniquePtr a new array to own, destroying any previously-owned array.

Public function

void

 

Reset

(
    TYPE_OF_NULLPTR InPtr
)

Public function

 

TUniquePtr

(
    U* InPtr,
    Deleter&& InDeleter
)

Pointer constructor - takes ownership of the pointed-to array

Public function

 

TUniquePtr()

Default constructor - initializes the TUniquePtr to null.

Public function

 

TUniquePtr

(
    const TUniquePtr&
)

Non-copyable.

Public function

 

TUniquePtr

(
    U* InPtr
)

Pointer constructor - takes ownership of the pointed-to array

Public function

 

TUniquePtr

(
    TYPE_OF_NULLPTR
)

Nullptr constructor - initializes the TUniquePtr to null.

Public function

 

TUniquePtr

(
    TUniquePtr&& Other
)

Move constructor

Public function

 

TUniquePtr

(
    TUniquePtr< OtherT, OtherDeleter > ...
)

Constructor from rvalues of other (usually less qualified) types

Public function

 

TUniquePtr

(
    U* InPtr,
    const Deleter& InDeleter
)

Pointer constructor - takes ownership of the pointed-to array

Operators

Name Description

Public function Const

 

operator bool()

Operator bool

Public function Const

bool

 

operator!()

Logical not operator

Public function Const

T &

 

operator[]

(
    SIZE_T Index
)

Indexing operator

Public function

TUniquePtr &

 

operator=

(
    TYPE_OF_NULLPTR
)

Nullptr assignment operator

Public function

TUniquePtr &

 

operator=

(
    TUniquePtr&& Other
)

Move assignment operator

Public function

TUniquePtr &

 

operator=

(
    TUniquePtr< OtherT, OtherDeleter > ...
)

Assignment operator for rvalues of other (usually less qualified) types

Public function

TUniquePtr &

 

operator=

(
    const TUniquePtr&
)

Typedefs

Name

Description

ElementType

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