-
Bug
-
Resolution: Fixed
-
P3
-
None
secondTimeline objects created as part of delayTimeline are never stopped
which leads to memory growth and potential OOM.
Modifying delayTimeline the following way fixes the issue:
144 @Override public void handle(ActionEvent event) {
if (secondTimeline != null)
secondTimeline.stop();
145 secondTimeline = new Timeline();
146 secondTimeline.setCycleCount(Timeline.INDEFINITE);
147 secondTimeline.getKeyFrames().add(
148 new KeyFrame(Duration.seconds(1), new EventHandler<ActionEvent>() {
149 @Override public void handle(ActionEvent event) {
150 refreshClocks();
151 }
152 }));
153 secondTimeline.play();
154 }
I am not sure this is correct fix from DigitalClock functionality, so please
provide another one in case this is the case.
which leads to memory growth and potential OOM.
Modifying delayTimeline the following way fixes the issue:
144 @Override public void handle(ActionEvent event) {
if (secondTimeline != null)
secondTimeline.stop();
145 secondTimeline = new Timeline();
146 secondTimeline.setCycleCount(Timeline.INDEFINITE);
147 secondTimeline.getKeyFrames().add(
148 new KeyFrame(Duration.seconds(1), new EventHandler<ActionEvent>() {
149 @Override public void handle(ActionEvent event) {
150 refreshClocks();
151 }
152 }));
153 secondTimeline.play();
154 }
I am not sure this is correct fix from DigitalClock functionality, so please
provide another one in case this is the case.