TArray::Reset

Same as empty, but doesn't change memory allocations, unless the new size is larger than the current array.

Choose your operating system:

Windows

macOS

Linux

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/Containers/Array.h

Include

#include "Containers/Array.h"

Syntax

void Reset
(
    SizeType NewSize
)

Remarks

Same as empty, but doesn't change memory allocations, unless the new size is larger than the current array. It calls the destructors on held items if needed and then zeros the ArrayNum.

Parameters

Parameter

Description

NewSize

The expected usage size after calling this function.