Array clear
Arrays and ranges
Generic
Array clear
Array
Array
Description
Removes all elements from an array in place and returns the empty array. Has execution pins (not pure).
When to use
Use Array clear to reset an array to empty — for example, flushing a batch buffer after processing its contents, or resetting an accumulator between loop iterations. The node mutates the array in place and outputs the emptied reference.
Pins
Input pins
| Pin | Type | Default | Notes |
|---|---|---|---|
| Array | generic[] | — | The array to clear. The element type resolves at design-time from the connected source. |
Output pins
| Pin | Type | Notes |
|---|---|---|
| Array | generic[] | The same array, now empty. |
Execution pins
| Pin | Direction |
|---|---|
| In | Input |
| Out | Output |
Example
After processing all items accumulated in a local array variable, wire the variable into Array clear to empty it, then wire the output Array back into a local variable set. The array is now ready to collect the next batch.