I use a structure like the following:
HashMap < EnumA , HashMap < Integer , LinkedList < EnumB > > > OverallMap
If I were to do this:
OverallMap . clear ( )
Will everything that was discarded by the clear() (the HashMap objects, the Integer objects, and the LinkedList objects) eventually get garbage-collected, or do I have to iterate all the way down to the lists and call clear() on them before clear()ing the inner maps and then clear()ing the outer map?
As long as nothing else references those other objects they will be garbage collected.