Ram Purge

Discussion in 'Archived: Plugin Requests' started by Jorrdan, Apr 15, 2011.

  1. Offline

    Jorrdan

    Just thought of this. Could anyone design a plugin where when you type /reload or even /rampurge it would clear unused ram? Instead of the server being stuck at full capacity all day? Even set it on a timer perhaps?
     
  2. Offline

    PurelySatanic

    I don't believe there is any way to force Java to garbage collect besides it's automated garbage collecting, so you might as well just use a automated server restart plugin which you can find by searching on the forum here.

    Let me correct this: You can "force" a garbage collection using System.gc() however it will not do anything more than the automated garbage collection does already. The fact of the matter is, is that if Minecraft itself it's dereferencing objects properly then there is no way for us as a programmer to know which needs to be discarded or not.

    If that makes sense.
     
  3. Offline

    Jorrdan

    Makes sense. Thank you for your response PurelySatanic! Well atleast we can take comfort in the fact that the garbage collection is fairly decent already. Just thought it would be a cool plugin ;p
     

Share This Page