This week's giveaway is in the Testing forum.
We're giving away four copies of TDD for a Shopping Website LiveProject and have Steven Solomon on-line!
See this thread for details.
Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

islands of isolation.....

 
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
I have gone through this topic many times in K&B's book, but each time i end-up with confusion. Pls can anyone out there throw some light on this topic.
This is from the test in the book which i wasn't able to understand.
1> objects with atleast one refrence will never be garbage collected. - i thought this stmt should be true - but it is not - explaination island of isolation.
2> If ob1 refers to ob2, then ob2 can't be garbage collected - this stmt is not true - again the same reason.
Please these island of isolation --- will now isolate me if i don't get to understand them.
 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Mona
I will try to throw some light on your questions.
Imagine situation that you have obj1 and obj2 and that obj1 refers
to obj2, the same situation as in your question 2 OK, but now pay
attention, imagine that obj1 is no longer in use and is not
referenced by any object at all, what will happen with obj2 ?
( it will become eligible for garbige collection as obj1 too. )
The same situation for question 1.
I hope that i've helped you to better understand
garbige collection topic.
 
keep an eye out for scorpions and black widows. But the tiny ads are safe.
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic