Optimize moist.cpp, change and avoid memory leak
Optimize Sorting.cpp, change and avoid memory leak