When I use clear() on a std::vector, it is supposed to destroy all the elements in the vector, but instead it doesn\'t.
clear()
std::vector
vector
Sample
Yes this is normal. clear() doesn't guarantee a reallocation. Try using resize() after clear().
resize()