Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

islands of isolation in Garbage Collection

 
Anuradha Prasanna
Ranch Hand
Posts: 115
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I understand,
"Islands of Isolation" means objects pointing to each other, without any live threads accessing any of these objects.
Is that correct?

Are these objects forming "islands of isolation" eligible for GC?
 
Vivek K Singh
Ranch Hand
Posts: 85
Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes they are, Actually this is the only case in which objects becomes eligible for garbage collection even if they still have valid references.
 
Anuradha Prasanna
Ranch Hand
Posts: 115
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
that means all these objects will be garbage collected, when JVM does the garbage collection?
 
Vivek K Singh
Ranch Hand
Posts: 85
Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes
 
Ankit Garg
Sheriff
Posts: 9497
22
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anuradha Prasanna wrote:that means all these objects will be garbage collected, when JVM does the garbage collection?

There are no guarantees if the objects will be garbage collected. You just need to know that they are eligible for GC for SCJP...
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic