GeeCON Prague 2014*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Garbage collection Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Garbage collection" Watch "Garbage collection" New topic
Author

Garbage collection

Shanky Sohar
Ranch Hand

Joined: Mar 17, 2010
Posts: 1051

Hi,,,,,,,,,i got really stuckj when i see the question related to garbage collection.........

can anybody tell me how can i draw a diagram to check......which one is avilable for GC.......

this question is from exam lab......



please tell.........how many object are eligible for GC after line 12......and how


SCJP6.0,My blog Ranchers from Delhi
Mahmoud Hossam
Ranch Hand

Joined: Feb 20, 2010
Posts: 74

it really helps to draw the relationships between the objects,try that
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9303
    
  17

This topic discusses the question you are confused with. There are other topics which you can search for which discuss this exact question and other topics like this which discuss garbage collection in general. You can search for them...


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
sumit kothalikar
Ranch Hand

Joined: Apr 15, 2010
Posts: 91

check this diagram of gc for the above code

only one object is eliegible for gc.


[Download untitled.bmp] Download



Thanks & Regards
Sumit Kothalikar
 
GeeCON Prague 2014
 
subject: Garbage collection