删除不必要的 System.gc() 调用 (#4416)
This commit is contained in:
@@ -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) {
|
||||||
|
|||||||
@@ -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();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user