Hacker News new | ask | show | jobs
by vvanders 3949 days ago
Did they ever fix the memory release semantics with std::vector?

Last time I looked std::vector::clear() wasn't required to release memory and caused a lot of headache when certain implementations wouldn't free the underlying memory.

I'm aware that the work around is to assign a new std::vector<T>() but that always felt like more of a hack then anything else.