This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
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


Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Garbage Collection" Watch "Garbage Collection" New topic
Author

Garbage Collection

Mathew Sam
Ranch Hand

Joined: Dec 19, 2001
Posts: 124

When the Object created in line1 is ready for garbage collection?.
Will it be ready just after line1 ?
[ June 11, 2002: Message edited by: Mathew Sam ]
Corey McGlone
Ranch Hand

Joined: Dec 20, 2001
Posts: 3271
Yes. There is no reference to the object after that line is executed, so it is eligible for garbage collection after line 1.
Corey


SCJP Tipline, etc.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Garbage Collection
 
It's not a secret anymore!