File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes About 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 "About Garbage Collection" Watch "About Garbage Collection" New topic
Author

About Garbage Collection

Jart Bo
Ranch Hand

Joined: Oct 22, 2007
Posts: 144
Hi,

An object has a valid reference, but no live thread has access to it. Will it be eligible for garbage collection?


SCJP, SCWCD
Ian Edwards
Ranch Hand

Joined: Aug 14, 2006
Posts: 107
I would say yes. As I understand it an object is eligible for garbage collection if no live threads have access to it.

The object that it has a reference to still exists unless it to is not being accessed by any live threads.
 
GeeCON Prague 2014
 
subject: About Garbage Collection