mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-14 14:26:43 -04:00
insert explicit 'System.gc()' call
This commit is contained in:
parent
134f96be08
commit
1ad8beb49e
@ -106,6 +106,9 @@ public class HMCLGameRepository extends DefaultGameRepository {
|
|||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
Logging.LOG.log(Level.WARNING, "Unable to create launcher_profiles.json, Forge/LiteLoader installer will not work.", ex);
|
Logging.LOG.log(Level.WARNING, "Unable to create launcher_profiles.json, Forge/LiteLoader installer will not work.", ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// https://github.com/huanghongxun/HMCL/issues/938
|
||||||
|
System.gc();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void changeDirectory(File newDirectory) {
|
public void changeDirectory(File newDirectory) {
|
||||||
|
@ -225,6 +225,9 @@ public final class VersionsPage extends BorderPane implements WizardPage, Refres
|
|||||||
root.setContent(failedPane, ContainerAnimations.FADE.getAnimationProducer());
|
root.setContent(failedPane, ContainerAnimations.FADE.getAnimationProducer());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// https://github.com/huanghongxun/HMCL/issues/938
|
||||||
|
System.gc();
|
||||||
}).executor().start();
|
}).executor().start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -81,7 +81,12 @@ public class DatapackListPage extends ListPageBase<DatapackListPageSkin.Datapack
|
|||||||
public void refresh() {
|
public void refresh() {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
Task.runAsync(datapack::loadFromDir)
|
Task.runAsync(datapack::loadFromDir)
|
||||||
.withRunAsync(Schedulers.javafx(), () -> setLoading(false))
|
.withRunAsync(Schedulers.javafx(), () -> {
|
||||||
|
setLoading(false);
|
||||||
|
|
||||||
|
// https://github.com/huanghongxun/HMCL/issues/938
|
||||||
|
System.gc();
|
||||||
|
})
|
||||||
.start();
|
.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -102,6 +102,9 @@ 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/huanghongxun/HMCL/issues/938
|
||||||
|
System.gc();
|
||||||
}, Platform::runLater);
|
}, Platform::runLater);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -100,6 +100,9 @@ public class WorldListPage extends ListPageBase<WorldListItem> implements Versio
|
|||||||
itemsProperty().setAll(result.stream()
|
itemsProperty().setAll(result.stream()
|
||||||
.filter(world -> isShowAll() || world.getGameVersion() == null || world.getGameVersion().equals(gameVersion))
|
.filter(world -> isShowAll() || world.getGameVersion() == null || world.getGameVersion().equals(gameVersion))
|
||||||
.map(WorldListItem::new).collect(Collectors.toList()));
|
.map(WorldListItem::new).collect(Collectors.toList()));
|
||||||
|
|
||||||
|
// https://github.com/huanghongxun/HMCL/issues/938
|
||||||
|
System.gc();
|
||||||
}, Platform::runLater);
|
}, Platform::runLater);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user