title: Removing objects from Java Collections
body: <p>I have a <code>HashMap</code> (although I guess this question applies to other collections) of objects. From what I understand, when the documentation talks about removing mappings, then it is removing the entry from the hashtable, i.e. not necessarily destroying the actual object. If the only remaining reference to the object is in this table, then will the object get garbage collected?</p>
  
  <p>If I do <code>map.clear()</code> and those objects that were in the table are not referenced anywhere else, will they get garbage collected?</p>
  
  <p>What is the fastest way, to actually remove all entries from the table, but also destroy those objects. </p>