Hacker News new | ask | show | jobs
by Ididntdothis 2211 days ago
It depends. Either iterate over the vector and delete the objects or just call clear(). Obviously you have to be sure that nobody else is accessing it at the same time.