[Added] java memory management