title: Deleting element from a vector of lists C++
body: <p>I have a class that has a std::list as a member variable. I also have a vector of these classes. If I delete an element from the vector, will the class destructor be called on the deleted instance? Do I have to explicitly clear my list with list::clear() in the destructor? </p>
  
  <pre><code>class my_class {
      string class_name;
      list&lt;int&gt; my_list;
  public: 
      my_class(); 
      ~my_class(); // destructor
  };
  
  vector&lt;my_class&gt; my_vec;
  
  my_class obj1, obj2, obj3;
  my_vec.push_back(obj1);
  my_vec.push_back(obj2);
  my_vec.push_back(obj3);
  
  my_vec.erase(my_vec.begin()+2); //Is this sufficient? 
  </code></pre>