title: hash_map value deletion
body: <p>My question concern memory management.</p>
  
  <p>I got this container :</p>
  
  <pre><code>typedef hash_map&lt;const string, Powerdomain*, strptrhash, strptrequal&gt; PowerdomainHashMap;  
  </code></pre>
  
  <p>now I add one element in it    </p>
  
  <pre><code>PowerdomainHashMap powerdomainMap;
  Powerdomain* pd1=new Powerdomain("Powerdomain1");
  powerdomainMap.insert(Powerdomain_pair(pd1-&gt;getName(),pd1));  
  </code></pre>
  
  <p>After that my program does a first step.</p>
  
  <p>Now that the first step is done, i no longer need the powerdomains and want to delete them.</p>
  
  <p>Is a <code>powerdomainMap.clear()</code> sufficient ? Will it destroy all the  value entries in the map (ie call delete on every Powerdomain* in the map? </p>
  
  <p>(I think it is better than calling delete on a iterator on the map but i am not sure)</p>