search

Home  >  Q&A  >  body text

java 直接内存回收

大家讲道理大家讲道理2766 days ago645

reply all(3)I'll reply

  • 迷茫

    迷茫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

    reply
    0
  • PHP中文网

    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!

    reply
    0
  • PHP中文网

    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

    reply
    0
  • Cancelreply