aspose file tools*
The moose likes Beginning Java and the fly likes Garbage collection program really confusing me? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Garbage collection program really confusing me?" Watch "Garbage collection program really confusing me?" New topic
Author

Garbage collection program really confusing me?

Vishal Hegde
Ranch Hand

Joined: Aug 01, 2009
Posts: 1055




How come 1 object is eligible for garbage collection?
}
}


http://www.lifesbizzare.blogspot.com || OCJP:81%
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3825

Is this a mock question? Then please QuoteYourSources


SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
Vishal Hegde
Ranch Hand

Joined: Aug 01, 2009
Posts: 1055

Ya from scjp 6 book kathy sierras but i cudnt understand how come only one object becomes eligible for garbagre collection
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3825

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

Joined: Aug 01, 2009
Posts: 1055

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

Joined: Oct 13, 2005
Posts: 38405
    
  23
Draw object "A" then an arrow to object "B", etc etc.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Garbage collection program really confusing me?