Hi

Lets say we have an object

Code:
MyClass o = new MyClass();
and we write following line

Code:
o = null;
What will be the effect of assigning a null to some object. Will the actual object allocated on heap be cleaned or just the reference to that object on heap be cleaned and the actual object on heap will be cleaned when Garbage Collector runs?