C++ delete vector, objects, free memory
You can call clear, and that will destroy all the objects, but that will not free the memory. Looping through the individual elements will not help either (what action would you even propose to take on the objects?) What you can do is this: That will create an empty vector with no memory allocated and … Read more