hello,
my profiler told me that a major reason for the garbage collection is the boxing and unboxing of primitive types in hashmaps.
i use a lot of hashmaps like this
HashMap<Integer,MyObject>
and then query them like this
int key = 5;
hashmap.get(key);
the get function automatically creates a new Integer object, which is used onyl for the sake of calling the equals function in order to fetch the object of the map.
is there any way to avoid this creation of the Integer object? thanks!