free up the memory when finished with arrays.