Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
pragmatib
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
3 ms
·
1.
▲
by
pragmatib
11y ago
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.