File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

When the a, and b are eligible for GC?

 
bujin wang
Ranch Hand
Posts: 48
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Adrian Pang
Ranch Hand
Posts: 40
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic