Original Post
I have a class member variable that is a vector, I use it for a given amount of time but I want to delete it and hence free memory IN a certain method.How do I make sure that the vector is deleted? resize() and clear() do not help, because the capacity() is still the same as the size as before.
I want to reduce the current meomory requiremnets of this program on my machine because even though I have 512 MB RAM, I still get a warning that windows is low on virtual memory and that the page size is being adjusted.I use vectors for a class that is instantiated a number of times and my guess is that keeping the vectors right until the time that the class objects go out of scope and are automaticlly destroyed might not be the best idea and I must explicitly free memory when Im done and over with it.
The vectors store data in excess of 50 mb sometimes,Do you think this could be the problem that leads to the warning about "low virtual memory"?