I am working with some legacy code. During execution, that code creates multiple windows and disposes them. However, they are still reachable and i.e. calling java.awt.Window.getWindows()
returns a large array of java.awt.Window
, javax.swing.JFrame
, javax.swing.JDialog
and the like, all of which have their name starting with "dead-". This now increasingly becomes a problem.
So here are my questions: Am I correct, that the 'dead-' prefix of the name is created by the System?
What can I do to properly dispose old windows such that they are no longer reachable and returned by java.awt.Window.getWindows()
? Thanks a lot!