• Post Reply Bookmark Topic Watch Topic
  • New Topic

Garbage Collector  RSS feed

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI all,
Can anyone please tell me something about the Garbage Collector. besides that, it is used for freeing up the memory resources. I want to now what all types of objects it collects and how does it maintain the list of these objects to be collected and what algorithms it uses for freeing thememory? (Please help)
thanks in advance
piyush kumar
 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Download the J2SE specs and go thru it. What you ask for is a HUGE topic and its tough posting it here.
 
Marshal
Posts: 56600
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
More about the Garbage collector here.
 
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The very best thing about the garbage collector is that you can usually ignore it. Pay attention to when your variables go out of scope and objects might become eligible for GC. That's important to know. But do not meddle in the affairs of the GC until you have some advanced need to tune stack and heap sizes. If I had to do that, I'd follow Dr. Phil's advice and "get some help."

On the other hand, the algorithms are wondrous in their complexity and beauty. I like to read about such things, be really impressed that there are people who can make them up, and then go on my way. They change from one JVM release to the next, so optimizing your code to match today's algorithm could be a seriously bad idea.
[ September 07, 2007: Message edited by: Stan James ]
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!