How to send a request to garbage collector?
Answers were Sorted based on User's Feedback
Garbage collector is automatically called by JVM.
But can make the request by calling gc() method on System class as follows.
System.gc();
Note that we are making only request Garbage Collector may
called or may not called.
Garbage Collector is automatically called at two conditions.
1)When CPU is ideal.
2)When huge amount of memory is required.
| Is This Answer Correct ? | 6 Yes | 0 No |
Answer / viiraj
Garbage collection is implicitly accomplished with
termination of instance.
Wee dont need to explicitly request.
| Is This Answer Correct ? | 4 Yes | 2 No |
Answer / manikandan [ gtec,vellore ]
we can't force a garbage collection.it automatically runs
when system runs out of memory.
| Is This Answer Correct ? | 2 Yes | 1 No |
What are the diff types of exception?
Is the session factory thread safe?
Can you write Java code for declaration of multiple inheritance in Java ?
What are the different methods of identifying an object?
What is clustering? What are the different algorithms used for clustering?
What is meant by method chaining?
Why do I get a duplicate name error when loading a jar file?
What are different types of layout managers in java.awt package?
What is an abstract method?
What is the highest-level event class of the event-delegation model?
In a multitiered application which tier is the browser in?
What are the advanatages of RMI ?