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 states associated in the thread?
If i learn Java, what kind of applications can i create that will help Banking, Retail, Hotel, Logistics industry.
In our urls and in the text of the buttons we have comma. Its causing an error. Is there a way to change the delimiting character for the menu arguments?
What method is invoked to cause an object to begin executing as a separate thread?
Differences between applications and applets?
When a thread blocks on i/o?
In HashTable I am storing null value..then what is the error it will show
What if the static modifier is removed from the signature of the main method?
what is stringBuffer and StringBuilder?
what are the advantages of JTA over JTS?
Tell me about Firewalls in RMI?
What happens when a thread cannot acquire a lock on an object?