shrink_to_fit也试过了,不返还。
另外map不提供这个方法
【 在 one4all4one (one4all4one) 的大作中提到: 】
: One technique that is commonly used is to swap the vector you want to empty out with a new and completely empty vector, like this:
: // suppose the type of your vectors is vector<int>
: vector<int>().swap (myvec[i]);
: ...................
--
FROM 159.226.67.*