TArray::SetNum

Resizes array to given number of elements.

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 SetNum
(
    SizeType NewNum,
    bool bAllowShrinking
)

Remarks

Resizes array to given number of elements.

Parameters

Parameter

Description

NewNum

New size of the array.

bAllowShrinking

Tell if this function can shrink the memory in-use if suitable.