When will an object be <font color=red>eligible for garbbage collection</font>
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   sabu_vs
Posted On:   Wednesday, October 23, 2002 05:48 AM

Hi


Could you pls tell when will an object be eligible for garbbage collection .

suppose I have a method that prints a message.The method uses a class Show[a class contains some method to print some values].

In the middle of the method method I made the Show object to null . My question is when will the object be ready for garbage collection; the time when I set the object to null or after the method exection?

thanks very much

sabu

Re: When will an object be eligible for garbbage collection

Posted By:   Zac_Jacobson  
Posted On:   Wednesday, October 23, 2002 04:15 PM

The answers to most of the questions you've been asking recently are available in the Java Language Specification (section 12.6 and 12.7 in this case).

Re: When will an object be <font color=red>eligible for garbbage collection</font>

Posted By:   Gautam_Marwaha  
Posted On:   Wednesday, October 23, 2002 05:56 AM

when you set it to null, it becomes eligible for garbage collection. Exactly when it gets garbage collected cannot be accurately predicted
About | Sitemap | Contact