clear input for uniqueSort after sorting to prevent memory leak