How to send a request to garbage collector?

Answer Posted / nilesh bhil

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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain phantom read?

1741


AS a developer will u create a data source in connection pool? If so how will u do that, how to access the object from connection pool using IRAD tool?

1649


What is jboss?

578


What are the diff types of exception?

565


Write a program to show synchronization?

697






Is there a guarantee of uniqueness for entity beans?

572


What you mean by COM and DCOM?

621


How to deploy Jar, War files in J2EE?

2179


what is the use of State Factories?

1914


What are the steps to write p-to-p model application?

1968


Difference between loadclass and class.forname?

602


What is the difference between the ‘font’ and ‘fontmetrics’ class?

647


In inglish: How to convert jar to exe files? Em português: Como converter arquivos .jar para .exe?

2160


Name the eight primitive java types.

603


whats is mean by connectionpooling

1571