File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

About Garbage Collection

Jart Bo
Ranch Hand

Joined: Oct 22, 2007
Posts: 144

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

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.
I agree. Here's the link:
subject: About Garbage Collection
It's not a secret anymore!