This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes When the a, and b are eligible for GC? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "When the a, and b are eligible for GC?" Watch "When the a, and b are eligible for GC?" New topic
Author

When the a, and b are eligible for GC?

bujin wang
Ranch Hand

Joined: Jun 21, 2003
Posts: 48
Adrian Pang
Ranch Hand

Joined: Feb 20, 2004
Posts: 40
SCJP is properly a better forum for this post, but the variable is available for GC as soon as there are no more reference to it. The a inside testB is gone with the instance of testB is gone; which is the case when the instance of TestA is gone; which is the case when testAll completes. After testAll, a and b are candidates for GC.


SCJP 1.4, SCWCD 1.4, SCBCD 1.3
 
 
subject: When the a, and b are eligible for GC?