File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Garbage collection program really confusing me?

 
Vishal Hegde
Ranch Hand
Posts: 1077
Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator



How come 1 object is eligible for garbage collection?
}
}
 
Vijitha Kumara
Bartender
Posts: 3908
9
Chrome Fedora Hibernate
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is this a mock question? Then please QuoteYourSources
 
Vishal Hegde
Ranch Hand
Posts: 1077
Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ya from scjp 6 book kathy sierras but i cudnt understand how come only one object becomes eligible for garbagre collection
 
Vijitha Kumara
Bartender
Posts: 3908
9
Chrome Fedora Hibernate
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Vishal,

Best way to see is by drawing the objects in the question with their relationships. And a simple search will give you same exact question discussed before in the forum like this
Make a special note about the static reference too.


 
Vishal Hegde
Ranch Hand
Posts: 1077
Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok Vijitha thanks in advance, can you give me a diagramatic representation on how to represent a garbage collection .I saw in the book related to isolations of island i was unable to understand the diagram (i did understood the diagram a bit but not in a crystal clear manner .)
 
Campbell Ritchie
Sheriff
Pie
Posts: 47293
52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Draw object "A" then an arrow to object "B", etc etc.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic