|
|
Home J2EE Concepts JMS Java Language Contact Back Next Bookmark this Page |
Some useful tips related to:
|
OverviewGarbage Collector is an asynchronous memory management process that is executed by JVM in background to free up unused memory space that is being occupied by unused objects. Unused memory locations include:
How to call Garbage Collector?The answer: Call System.gc() However, issuing System.gc() doesn't mean that system would start performing garbage collection immediately. Yes, you read it correctly. Typically, this command makes a request to system to perform Garbage Collection; but it doesn't guarantee that objects that are no more being referred would be garbage collected immediately. In fact, if your program is dependent on outcome of system.gc(), then probably you need to reconsider the design. |
|
|
|