posted 22 years ago
Hi Sohir,
Object references are never garbage collected. The object that is referenced by the reference can be gc'ed.
This might be a little bit confusing...Have a look at following.
However, b and c are not gc'ed. the object created at line 1 can be gc'ed. Reference is just like a gateway to memory location which can be gc'ed. the scope of a reference var ends after the scope of block.
HIH
Rashmi