title: How to delete from map all records with same value but different keys?
body: <p>I have <code>boost::unordered_map&lt;int, Animal*&gt;</code> and I need to delete all inserts where value is the same pointer like <code>Animal* a;</code> ( <strong>a</strong> is given <strong>Animal*</strong> like parameter, I have for different keys in map same <strong>Animal*</strong> pointer on couple places).</p>
  
  <pre><code>boost::unordered_map&lt;int, Animal*&gt; mp;
  Animal* rex = new Animal("Rex");
  mp[1]=rex;
  mp[2]=rex;
  mp[9]=rex;
  </code></pre>
  
  <p>How to delete all records where value is rex, and after that delete rex from heap only once ?</p>