It is good programming practice to clean up arrays after they are no longer needed. In 4D, here are a number of simple ways to clear an array:
- Manually delete each element in the array
DELETE ELEMENT(myArray;1; Size of Array(myArray) )
- Initialize the array to zero elements
- You can also clear the array by using CLEAR VARIABLE(myArray) if you don't need it defined in interpreted mode any longer.