• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

what is island of isolated objects

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I had read an article written by Corey on garbage collection.He discussed the problem graphically which was very easy to understand.
But what is island of isolated objects.How can I solve it's questions graphically,If anyone could please explain it to me that will be very useful. I have copied a question below from Dan's on garbage collection as an example


Please help me get through this island.
Thanks,
 
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Suppose you have created two objects a and b of classes A and B respectively. Suppose further that object a has a reference to object b.

If no thread in your program refers to object a or to object b, then the pair of objects a and b are isolated. Even although object a still has a reference to object b.

This is an example of what Corey calls an "island of isolated objects". You could create some complex configurations of objects linked by references in various ways. Provided no thread in your program refers to any one of those linked objects the whole complex structure is eligible for garbage collection.

As an example of a common complex structure:


 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic