Does it make sense to use setVisible(false) on a dialog and reuse it later or is safer to call dispose() every time and to make a new JDialog. What about memory leaks with setVisible(false)?
EDIT: My Question isn't so much about quitting the application. More about Dialogs that have the main frame as parent and are opened and closed during the application life time. E.g. let's say my applications has about 10 dialogs that display different data every time I open them. Should I reuse the instances and use setVisible() or should I make a new Dialog every time and dispose() them on closing.
dispose()
will reuse those same instances, while releasing resources and freeing up memory. – Antipyrine