Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within OCPJP
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Programmer Certification (OCPJP)
difference between System.gc() and Runtime.getRuntime().gc() ?
Divyya Joshi
Ranch Hand
Posts: 102
posted 12 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hello friends, my query is as follows:
We can request garbage collector by System.gc() as well as Runtime.getRuntime().gc() .
Can any one tell What's the differnce between two ?
Thanks in advance.
Swastik Dey
Bartender
Posts: 2270
20
I like...
posted 12 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
No difference, because when you call System.gc(), it implicitly calls
Runtime.getRuntime().gc();
So, System.gc() is a convenient way of calling.
Swastik
Darryl Burke
Bartender
Posts: 5167
11
I like...
posted 12 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
What does the API have to say about it?
luck, db
There are no new questions, but there may be new answers.
Swastik Dey
Bartender
Posts: 2270
20
I like...
posted 12 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
http://download.oracle.com/javase/1.4.2/docs/api/java/lang/System.html#gc(
)
Swastik
With a little knowledge, a
cast iron skillet
is non-stick and lasts a lifetime.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
"delete" in java
What is the diffrerence between System.gc() and Runtime.gc()
why two gc() method ?
GC
Garbage Collection Problem
More...