Let's consider a class that contains a vector:
AGivenClass
{
public:
vector< int > vec_int;
};
and let's consider that we have an instance, which is a vector of the class :
vector < AGivenClass > vec_instance;
My question is : Is doing
vec_instance.clear()
enough to free memory, including for the previously filled vec_int internal to the class ?