Letting Java decide when to collect garbage.
This commit is contained in:
parent
23e1803a81
commit
250c082d60
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -134,7 +134,6 @@ class EntityCleanupTask implements Runnable
|
|||
if(nextRunPercentageStart > .99)
|
||||
{
|
||||
nextRunPercentageStart = 0;
|
||||
System.gc(); //clean up every hour
|
||||
}
|
||||
|
||||
EntityCleanupTask task = new EntityCleanupTask(nextRunPercentageStart);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user