Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/TArray
Overloads
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void RemoveAtSwap
(
SizeType Index, |
Removes an element at the given location, optionally shrinking the array. | Containers/Array.h | |
void RemoveAtSwap
(
SizeType Index, |
Removes an element (or elements) at given location, optionally shrinking the array. | Containers/Array.h |
RemoveAtSwap(SizeType, EAllowShrinking)
Description
Removes an element at the given location, optionally shrinking the array.
This version is much more efficient than RemoveAt (O(Count) instead of O(ArrayNum)), but does not preserve the order.
| Name | RemoveAtSwap |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Containers/Array.h |
| Include Path | #include "Containers/Array.h" |
void RemoveAtSwap
(
SizeType Index,
EAllowShrinking AllowShrinking
)
Parameters
| Name | Remarks |
|---|---|
| Index | Location in array of the element to remove. |
| AllowShrinking | (Optional) By default, arrays with large amounts of slack will automatically shrink. Use FNonshrinkingAllocator or pass EAllowShrinking::No to prevent this. |
RemoveAtSwap(SizeType, SizeType, EAllowShrinking)
Description
Removes an element (or elements) at given location, optionally shrinking the array.
This version is much more efficient than RemoveAt (O(Count) instead of O(ArrayNum)), but does not preserve the order.
| Name | RemoveAtSwap |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Containers/Array.h |
| Include Path | #include "Containers/Array.h" |
void RemoveAtSwap
(
SizeType Index,
SizeType Count,
EAllowShrinking AllowShrinking
)
Parameters
| Name | Remarks |
|---|---|
| Index | Location in array of the element to remove. |
| Count | Number of elements to remove. |
| AllowShrinking | (Optional) By default, arrays with large amounts of slack will automatically shrink. Use FNonshrinkingAllocator or pass EAllowShrinking::No to prevent this. |