Skip to content

Commit

Permalink
Fix rendering memory leak in JavaFX example, fixes #432
Browse files Browse the repository at this point in the history
  • Loading branch information
sarxos committed Feb 10, 2016
1 parent 87ee6bf commit 158b65a
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -206,11 +206,12 @@ protected Void call() throws Exception {
try {
if ((grabbedImage = webCam.getImage()) != null) {

final Image mainiamge = SwingFXUtils.toFXImage(grabbedImage, null);

Platform.runLater(new Runnable() {

@Override
public void run() {
Image mainiamge = SwingFXUtils.toFXImage(grabbedImage, null);
imageProperty.set(mainiamge);
}
});
Expand Down

0 comments on commit 158b65a

Please sign in to comment.