Homec4science

Dispose the SingleWindowDisplay window on close

Authored by Curtis Rueden <ctrueden@wisc.edu> on May 3 2017, 18:40.

Description

Dispose the SingleWindowDisplay window on close

Previously, if such a Coloc 2 window was ever created and shown,
even if later closed, ImageJ would not quit properly afterward.

Two changes here which are intertwined:

  1. All java.awt.Window instances need their dispose() method called when they are intended to go away, or else the JVM will not shut down. This is the exception to the rule with Java, where normally the programmer does not need to care at all about cleaning up anything. But AWT windows are special.
  1. The WindowListener created in Coloc_2 was responding to windowClosed events, not windowClosing events, but for some reason, windowClosed never fired. Unregistering the window and disposing it during windowClosing does work, though.

Details

Committed
Curtis Rueden <ctrueden@wisc.edu>May 3 2017, 20:21
Pushed
oburriMar 8 2018, 18:06
Parents
R6269:ad56fd31ad91: SingleWindowDisplay: do not keep list of displays
Branches
Unknown
Tags
Unknown

Event Timeline

Curtis Rueden <ctrueden@wisc.edu> committed R6269:125146324f1a: Dispose the SingleWindowDisplay window on close (authored by Curtis Rueden <ctrueden@wisc.edu>).May 3 2017, 20:21