Erase myArray

It not only removes values, if it is a dynamic array, it releases it which means that it has no bounds.