Home Help Java G Java Garbage Collection
Questions:Ask|Latest

 
 

Share on Google+Share on Google+

Java Garbage Collection

Advertisement
The Java language is the most widely used programming language to rely on garbage collection.

Java Garbage Collection

     


The Java language is the most widely used programming language to rely on garbage collection. The name "garbage collection" implies that objects that are no longer needed by the program are "garbage" and can be thrown away or destroyed. The Java virtual machine's heap stores all objects created by a running Java application. Objects are created by the new operator but never freed explicitly by the code.

Garbage collection is the process of automatically freeing objects that are no longer referenced by the program. Such as object must be recycled so that the space is available for succeeding new objects. The garbage collector determines which objects are no longer referenced by the program and make available the heap space occupied by such unreferenced objects. Garbage collection relieves the programmer from the load of freeing allocated memory.


Read example at:

http:/www.roseindia.net/java/beginners/GarbageCollection.shtml

 

Advertisement

If you enjoyed this post then why not add us on Google+? Add us to your Circles



Liked it!  Share this Tutorial


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: November 11, 2009

Related Tutorials

Ask Questions?    Discuss: Java Garbage Collection  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments
DMCA.com