1) We Created a Restaurant POS using JavaFX.
2) We have one main application and all other activity will open in Dialog
which extend stage. This Stages are in memory always even after closing the stage using stage.close()
.
3) The worse case is if I open the dialog multiple time memory leak is happening.
eg: first call of stage need 30 MB
memory next call to stage cause 60 MB usage and will continue like this 30MB, 60MB, 90MB, 120MB....................etc.
4) We took a painful approach to solve this issue once waiter ordered and click finish button we call System.exit(0)
and reopen the jar
file using
Process proc = Runtime.getRuntime().exec("java -jar BookingFX.jar");
so every time the waiter have to wait a little to reopen the application.
5) As programmers we got very a bad image because this memory leak, We did this POS using SpringFrame
work and MySQL
and it is a three month of effort and I am the one who suggested the JavaFX for development instead of swing . We tried JDK8 early access to check for any hope but failed. Now our boss is asking us to move towards Windows programming using Visual C++ or Any other platform.