Since implementations of std::vector's clear member function typically do not deallocate memory after destroying the elements (hence the shrink_to_fit member function, though even that is advisory), it sounds like std::vector will suffice for your needs.