you should be store a hashMap value in a variable if I need to use that value multiple times. create method bound variable is create a reference to the HashMap value, then you use reference to de equeals, when you do end of the method, JVM will be callback all memory used by this method.