This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Java in General and the fly likes Query Reg GC Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Java in General
Bookmark "Query Reg GC" Watch "Query Reg GC" New topic

Query Reg GC

Gaurav Mac Mathur
Ranch Hand

Joined: Feb 19, 2002
Posts: 47
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

Joined: Jul 08, 2003
Posts: 24189

Right, never. Not really a "guru"-type question: the
object is always reachable via the static reference,
so it's never collected.

[Jess in Action][AskingGoodQuestions]
Gaurav Mac Mathur
Ranch Hand

Joined: Feb 19, 2002
Posts: 47
I needed Confermation that I am correct
Have you checked out Aspose?
subject: Query Reg GC
It's not a secret anymore!