删除不必要的 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) { } catch (IOException ex) {
LOG.warning("Unable to create launcher_profiles.json, Forge/LiteLoader installer will not work.", 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) { public void changeDirectory(File newDirectory) {

View File

@@ -74,9 +74,6 @@ public final class DatapackListPage extends ListPageBase<DatapackListPageSkin.Da
Task.runAsync(datapack::loadFromDir) Task.runAsync(datapack::loadFromDir)
.withRunAsync(Schedulers.javafx(), () -> { .withRunAsync(Schedulers.javafx(), () -> {
setLoading(false); setLoading(false);
// https://github.com/HMCL-dev/HMCL/issues/938
System.gc();
}) })
.start(); .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())); itemsProperty().setAll(list.stream().map(ModListPageSkin.ModInfoObject::new).sorted().collect(Collectors.toList()));
else else
getProperties().remove(ModListPage.class); getProperties().remove(ModListPage.class);
// https://github.com/HMCL-dev/HMCL/issues/938
System.gc();
}, Platform::runLater); }, Platform::runLater);
} }

View File

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