• 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

garbage collection?

 
Ranch Hand
Posts: 252
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


here answer is 2,4
how come 4....i read in khalid...that its not neccessary that for the object to be garbage collected u need to set the references to null...dont remember the exact sentence...whats the case with isolation islands..they have the object references but then also they are eligible for GC.

one more doubt ..like in the Which of the following statements are true?sort of questions would b there or else they mention how many to choose??

sri
 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
srikanth
You are correct that you don't have to set references to null. I thank they were tring to say that garbage collection occurs when there are no longer any vaild reference pointing to the object. This can occur for reason other then setting the reference to null.
 
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is important is that no live program thread has a reference to the island of objects. Then the island of objects is eligible for garbage collection.
 
reply
    Bookmark Topic Watch Topic
  • New Topic