I would like to know what happens to the old objects when the variable that pointed them before is now pointing another object. Are they deleted or what?
classA var = new classA();
var = new classB();
Is the object "classA" (that was created in the variable "var") deleted when the variable "var" is set equals to the object "classB"?