Letting Java decide when to collect garbage.

This commit is contained in:
ryanhamshire 2014-09-29 19:16:57 -07:00
parent 23e1803a81
commit 250c082d60
2 changed files with 0 additions and 7 deletions

View File

@ -205,11 +205,5 @@ class CleanupUnusedClaimsTask implements Runnable
chunk.unload(true, true);
}
}
//unfortunately, java/minecraft don't do a good job of clearing unused memory, leading to out of memory errors from this type of world scanning
if(this.nextClaimIndex % 5 == 0)
{
System.gc();
}
}
}

View File

@ -134,7 +134,6 @@ class EntityCleanupTask implements Runnable
if(nextRunPercentageStart > .99)
{
nextRunPercentageStart = 0;
System.gc(); //clean up every hour
}
EntityCleanupTask task = new EntityCleanupTask(nextRunPercentageStart);