This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android 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: 3817

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: 3817

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: 38025
    
  22
Draw object "A" then an arrow to object "B", etc etc.
 
Don't get me started about those stupid light bulbs.
 
subject: Garbage collection program really confusing me?
 
Similar Threads
What does this assignment mean?
Eligible for garbage collection
Problems with garbage collection
problem in garbage collection
Garbage Collection query.