Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/Templates
References
| Module | Core |
| Header | /Engine/Source/Runtime/Core/Public/Templates/UniquePtr.h |
| Include | #include "Templates/UniquePtr.h" |
Syntax
template<typename T>
struct TDefaultDelete
Remarks
Single-ownership smart pointer in the vein of std::unique_ptr. Use this when you need an object's lifetime to be strictly bound to the lifetime of a single smart pointer.
This class is non-copyable - ownership can only be transferred via a move operation, e.g.:
TUniquePtr
If you provide a custom deleter, it is up to your deleter to handle null pointers. This is a departure from std::unique_ptr which will not invoke the deleter if the owned pointer is null: https://en.cppreference.com/w/cpp/memory/unique_ptr/~unique_ptr
Specializations
Constructors
| Type | Name | Description | |
|---|---|---|---|
TDefaultDelete
(
const TDefaultDelete& |
|||
TDefaultDelete
(
const TDefaultDelete< U >& |
Destructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| const FTypeLayoutDesc & | |||
| FTypeLayoutDesc & |
Operators
| Type | Name | Description | |
|---|---|---|---|
| void | operator()
(
T* Ptr |
||
| TDefaultDelete & | operator=
(
const TDefaultDelete& |
||
| TDefaultDelete & | operator=
(
const TDefaultDelete< U >& |
Classes
| Type | Name | Description | |
|---|---|---|---|
| InternalLinkType |
Typedefs
| Name | Description |
|---|---|
| DerivedType | |
| InternalBaseType |
Constants
| Name | Description |
|---|---|
| CounterBase | |
| InterfaceType |