Quote Originally Posted by Oliver M.
@microcode

std::vector::clear() does not guarantee that the memory of the objects the vector holds is wiped and I do not think that any implementation actually do so. If you have sensitive data, the objects the vector holds should itself care of proper memory deletion.
I was thinking of vector<char>, and I guess you're right that it doesn't clear the memory to zero; it only frees the allocated memory. Thanks for clarifying that. I've been working with a class similar to vector<char> that does have a clear() function which clears the memory to zero.