SWT: cleaning up before application exit
- by Alexey Romanov
What is the best way for an SWT application to clean up resources before application exit? I see two options:
1) Add a DisposeListener to main window (or better, to the Display). Will it get run if an uncaught exception happens?
2) Use a shutdown hook. Any problems to be aware of there which aren't mentioned in Design of the Shutdown Hooks API?