Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/Templates > API/Runtime/Core/Templates/MakeUnique
References
| Module | Core |
| Header | /Engine/Source/Runtime/Core/Public/Templates/UniquePtr.h |
| Include | #include "Templates/UniquePtr.h" |
template<typename T, std::enable_if_t<< T >::Value ), int >>
TUniquePtr < T > MakeUnique
(
SIZE_T Size
)
Remarks
Allocates a new array of type T with the given size and returns it as a TUniquePtr. Only enabled for array-type TUniquePtrs. Elements are value-initialized, which will call a user-defined default constructor if it exists, but causes trivial types to be zeroed. A TUniquePtr which points to a newly-constructed T array of the specified Size.
Parameters
| Name | Description |
|---|---|
| Size | The size of the array to allocate. |