Free the dynamic vector(array) at the end of the merging