• Post Reply Bookmark Topic Watch Topic
  • New Topic

Garbage Collection (Islands of isolation)  RSS feed

 
Juan Manuel Alberto de los Santos
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Vijitha Kumara
Bartender
Posts: 3973
24
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Rob Spoor
Sheriff
Posts: 20898
81
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Even though both objects still have a reference (from the other one), no other code can ever get a reference.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!