I have a weird problem with vector in C++..
I created a vector and inserted 10000 integer values into it and have checked the memory utilization. It is 600 kb. But after
Try using the erase-remove idiom. If you are just erasing all of the elements from the vector then all you are doing is moving the end() iterator. So everything is still there in the vector but "unavailable".
http://en.wikipedia.org/wiki/Erase-remove_idiom