P
pkirk25
vector<string> buf_string;
buf_string.reserve(256);
vector<int> buf_mat_prices;
buf_mat_prices.reserve(1000);
During loops I fill the vectors and then I empty them with commands
like buf_string.clear();
buf_mat_prices.clear();
Does this mean that the memory allocation returns to default or is my
original reserve still in place?
buf_string.reserve(256);
vector<int> buf_mat_prices;
buf_mat_prices.reserve(1000);
During loops I fill the vectors and then I empty them with commands
like buf_string.clear();
buf_mat_prices.clear();
Does this mean that the memory allocation returns to default or is my
original reserve still in place?