Clearing memory map of maps?
742450Dec 27 2010 — edited Dec 27 2010Hi I have the following Class:
public class TestClass{
Map<String, Map<String, String>> aMap = new TreeMap<String, Map<String, String>>();
public void addStuff () {
//this adds things to aMap
}
public void clearMap() {
aMap = new TreeMap<String, Map<String, String>>();
}
}
Does my clearMap method make all memory used by this map ava. for garbage collection? What is the proper way to clear all memory to reset the aMap variable? Thanks.