TArray::RemoveSwap

Removes item from the 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

SizeType RemoveSwap
(
    const ElementType & Item,
    bool bAllowShrinking
)

Remarks

Removes item from the array.

This version is much more efficient, because it uses RemoveAtSwap internally which is O(Count) instead of RemoveAt which is O(ArrayNum), but does not preserve the order.

Returns

Number of elements removed.

See Also