title: Does std::list's erase member function call the destructor for all stored elements?
body: <p>I am debugging one memory issue it has some relation with the <code>std::list::erase</code> method. </p>
  
  <p>While reading the documentation for <code>std::list::erase</code>, I saw <a href="http://www.cplusplus.com/reference/list/list/erase/" rel="nofollow">this statement</a>:</p>
  
  <blockquote>
    <p>"This effectively reduces the container size by the number of elements removed, which are destroyed."</p>
  </blockquote>
  
  <p>I am having difficulty in understanding this statement. As an example, consider this setup:</p>
  
  <pre><code>class demo {
  
  };
  std::list&lt;demo *&gt; mylist;
  </code></pre>
  
  <p>Now, suppose I call <code>mylist.erase(iterator of list)</code>. I thought that this would call the destructor for class <code>demo</code>, but it doesn't seem to, which seems to contradict the statement "which are destroyed."</p>
  
  <p>Can you please help me with this?</p>
  
  <p>Thanks!</p>