Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Query Reg GC

 
Gaurav Mac Mathur
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I faced following problem in a test,
Q - when will the Object 'o' eligible for GC when the stand alone application is Executed.

My Answer was Never.
_any Comments from Java Gurus_
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24208
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Right, never. Not really a "guru"-type question: the
object is always reachable via the static reference,
so it's never collected.
 
Gaurav Mac Mathur
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I needed Confermation that I am correct
Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic