Fix memory leak on reload while importing

This commit is contained in:
mcrcortex
2025-06-21 12:32:24 +10:00
parent 1a7cd37741
commit 5f8679e5d2

View File

@@ -149,6 +149,10 @@ public class WorldImporter implements IDataImporter {
this.world.releaseRef(); this.world.releaseRef();
this.threadPool.shutdown(); this.threadPool.shutdown();
} }
//Free all the remaining entries by running the lambda
while (!this.jobQueue.isEmpty()) {
this.jobQueue.poll().run();
}
} }
private interface IImporterMethod <T> { private interface IImporterMethod <T> {