This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Garbage Collection Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Garbage Collection" Watch "Garbage Collection" New topic
Author

Garbage Collection

sonir shah
Ranch Hand

Joined: Nov 01, 2001
Posts: 435
What is the difference between runtime.gc() and system.gc()
When can we use them and how?
anand raman
Ranch Hand

Joined: Jun 06, 2001
Posts: 66
I guess the difference lies just in the class they exist. Both indicate to the garbage collector that it is probably a good time to run.
Hope this helps
Anand
Valentin Crettaz
Gold Digger
Sheriff

Joined: Aug 26, 2001
Posts: 7610
there is a discussion about that here:
http://www.javaranch.com/ubb/Forum24/HTML/013436.html
HIH
------------------
Valentin Crettaz
Sun Certified Programmer for Java 2 Platform


SCJP 5, SCJD, SCBCD, SCWCD, SCDJWS, IBM XML
[Blog] [Blogroll] [My Reviews] My Linked In
gabi lupu
Greenhorn

Joined: Dec 17, 2001
Posts: 1
Originally posted by sonir shah:
What is the difference between runtime.gc() and system.gc()
When can we use them and how?

system is platform independent and runtime is platform dependent.
 
 
subject: Garbage Collection