删除不必要的 System.gc() 调用 (#4416)

This commit is contained in:
Glavo
2025-09-09 20:21:47 +08:00
committed by GitHub
parent 37ad445620
commit 41e004f4d5
4 changed files with 0 additions and 12 deletions

View File

@@ -125,9 +125,6 @@ public class HMCLGameRepository extends DefaultGameRepository {
} catch (IOException ex) {
LOG.warning("Unable to create launcher_profiles.json, Forge/LiteLoader installer will not work.", ex);
}
// https://github.com/HMCL-dev/HMCL/issues/938
System.gc();
}
public void changeDirectory(File newDirectory) {

View File

@@ -74,9 +74,6 @@ public final class DatapackListPage extends ListPageBase<DatapackListPageSkin.Da
Task.runAsync(datapack::loadFromDir)
.withRunAsync(Schedulers.javafx(), () -> {
setLoading(false);
// https://github.com/HMCL-dev/HMCL/issues/938
System.gc();
})
.start();
}

View File

@@ -110,9 +110,6 @@ public final class ModListPage extends ListPageBase<ModListPageSkin.ModInfoObjec
itemsProperty().setAll(list.stream().map(ModListPageSkin.ModInfoObject::new).sorted().collect(Collectors.toList()));
else
getProperties().remove(ModListPage.class);
// https://github.com/HMCL-dev/HMCL/issues/938
System.gc();
}, Platform::runLater);
}

View File

@@ -99,9 +99,6 @@ public final class WorldListPage extends ListPageBase<WorldListItem> implements
} else {
LOG.warning("Failed to load world list page", exception);
}
// https://github.com/HMCL-dev/HMCL/issues/938
System.gc();
}).start();
}