what happen if an object set to null
if i set an object to null, is it make an object to an empty object?
and the memory use by that object is remove or not?
ImageIcon icon = new ImageIcon(file) //example use 8 byte
Image img = icon.getImage(); //example use 8 byte
if i set to null:
icon = null; // is the memory use by icon remove or not
img = null; // is the memory use by img remove or not
is that memory use by icon and img remove or not? if not remove how to remove the icon and img memory becouse i want use the same object to set another refrence.
I do that becouse it make my app out of memory