vector <int> ve; .... vector <int> ().swap(ve);
vector <int> ve; ... ve.clear(); ve.shrink_to_fit();
方法二的函数shrink_to_fit()只有c++11才有