I have about 20 vectors like the example below inside a buttoncontrol that will push_back data.
This buttoncontrol and all the vectors will read a .txtfile that takes up 1.5 MB.
So together the 20 vectors will fill data with a total of about 20 MB when I press the button.
So I beleive that this will take 20 MB from the RAM ?
What happens is that before I press the button. The whole application takes up: 53 MB.
When I press the button, the application will take up: 130 MB of RAM and stay like this.
Here I wonder. Shouldn´t the RAM go up to 130 MB and the drop to 53 MB again since I clear() all the vectors that store the data ?
Because if I press the button the second time now, the RAM goes up even more, to 200 MB.
It would be wonderful to hear any thoughts about this.
This way I am filling up the vectors with data.
std::vector<string> One; One.push_back(Stuff);
This way I suppose I clear the vector from taking up RAM ?