How garbage collector works

Showing Answers 1 - 3 of 3 Answers

sridevi

  • Oct 26th, 2005
 

garbage collector collects all the unreachable objects and because of this clens up the memory which is used by unreachable objects

  Was this answer useful?  Yes

Shiv Shankar

  • Nov 25th, 2005
 

Grabage Collector is least priority thread. The task for the GC is to clear the memory used by the no reference objects in the heap.we can't force the GC to come but we can place the request to come i.e by calling System.gc() or Runtime.gc() methods.

  Was this answer useful?  Yes

dev

  • Feb 15th, 2006
 

tks a lot for giving nice answer

plz tell me what is the difference b/n Runtime.gc() and System.gc()

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions