aspose 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

Win a copy of Groovy Fundamentals video training course this week in the Groovy forum!
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.
Don't get me started about those stupid light bulbs.
subject: About Garbage Collection