• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

About Garbage Collection

 
Jart Bo
Ranch Hand
Posts: 144
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

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
Posts: 107
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic