vector 内存释放: 1. vector<int>().swap(v); 2.v.clear(); v.shrik_to_fit(); 转载于:https://www.cnblogs.com/tomatokely/p/9700876.html