| Author |
Garbage Collection (Islands of isolation)
|
Juan Manuel Alberto de los Santos
Ranch Hand
Joined: Jun 26, 2008
Posts: 48
|
|
|
|
 |
Vijitha Kumara
Bartender
Joined: Mar 24, 2008
Posts: 3670
|
|
|
i1 object's i instance variable referes to i2 object and i2's instance variable refers to i1 object. When you make i1 & i2 null those two objects become isolated from outside.
|
SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
|
 |
Rob Spoor
Sheriff
Joined: Oct 27, 2005
Posts: 19216
|
|
|
Even though both objects still have a reference (from the other one), no other code can ever get a reference.
|
SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
|
 |
 |
|
|
subject: Garbage Collection (Islands of isolation)
|
|
|