迷茫2017-04-18 10:44:38
It is recycled through GC, but GC will only clean up the abandoned objects in direct memory when the old area is full and triggers Full GC
PHP中文网2017-04-18 10:44:38
System.gc(); is to notify (recommend) the JVM to recycle and run garbage collection, but it doesn’t necessarily matter whether the virtual machine will listen to you. So it is generally not recommended that you manually recycle memory. What the person above said is good!
PHP中文网2017-04-18 10:44:38
This, you need to have a good understanding of the algorithm of the garbage collection mechanism before you can talk about this thing