pragmatib
Re:A brief introduction to C++'s model for type- and resource-safety [...
on Friday January 15, 2016 @02:41PM (#10911580)
Actually you'd have to try harder: even this might leave the current capacity unchanged. The blessed idiom is vec.swap(std::vector<T>());
c++11 added shrink_to_fit which is a non binding request to reduce capacity.