Original Post
I haven''t been able find information on what happens *after* you do a reserve() on an STL vector. Say I have a vector and I do a reserve(100) on it. Now then...
a) If I fill the vector full with 100 items and then delete 2 of them, will the vector still be 100 in ''size'' or will it now be 98. That is if I add those 2 elements back into the vector again, will the vector have to allocate memory for them.
b) If I call clear() will the reserve(100) still be in effect?
Basically, how ''permanent'' is the reserve() function. Are there commands that override it and mess around with the memory allocation - which reserve() is designed to get around.
Thanks