Click here to Skip to main content
15,885,216 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
How to ensure whether or not the garbage collector is called in java when we are using System.gc() ?
Posted

1 solution

See http://docs.oracle.com/javase/7/docs/api/java/lang/System.html#gc()[^]. However it is still the virtual machine's decision as to whether it runs immediately or queues the request. In general you should not be concerned about it.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900