aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes islands of isolation in Garbage Collection Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "islands of isolation in Garbage Collection" Watch "islands of isolation in Garbage Collection" New topic
Author

islands of isolation in Garbage Collection

Anuradha Prasanna
Ranch Hand

Joined: Mar 09, 2006
Posts: 115
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?


SCJP 6.0 90%
Vivek K Singh
Ranch Hand

Joined: Dec 22, 2009
Posts: 85

Yes they are, Actually this is the only case in which objects becomes eligible for garbage collection even if they still have valid references.


SCJP 6
Anuradha Prasanna
Ranch Hand

Joined: Mar 09, 2006
Posts: 115
that means all these objects will be garbage collected, when JVM does the garbage collection?
Vivek K Singh
Ranch Hand

Joined: Dec 22, 2009
Posts: 85

yes
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9302
    
  17

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...


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: islands of isolation in Garbage Collection