Discussion :: Garbage Collections - Pointing out the correct statements (Q.No.1)
|Alexander Monakhov said: (Sep 9, 2010)|
|"Objects that can be reached from a live thread will never be garbage collected."
Very misleading. If the thread nullifies reference to some object, the object becomes eligible for GC. Thus, the statement "will never" is formally wrong.
In contrast, B is right with some addition.
"Objects that are guaranteed not to be used again are eligible for garbage collection."
Post your comments here:
Email : (optional)
» Your comments will be displayed only after manual approval.