NOTICE! This is a static HTML version of a legacy ImageJ Trac ticket.

The ImageJ project now uses GitHub Issues for issue tracking.

Please file all new issues there.

Ticket #616 (closed task: fixed)

Opened 2011-06-17T12:19:05-05:00

Last modified 2012-04-26T09:14:01-05:00

Handle the deletion of Displays

Reported by: bdezonia Owned by: curtis
Priority: major Milestone: imagej2-b2-bugfixes
Component: Display API Version:
Severity: serious Keywords:
Cc: Blocked By:
Blocking: #995


During debugging I determined that after windows have closed their Displays are still registered with the Event subscribing mechanism. When a window closes or a display is deleted (must decide here) we need to unregister event handlers.

Curtis left a TODO note about this in SwingImageDisplay. Barry has made some changes in the winCloseSubscriber code. These changes could instead listen for DisplayDeletedEvents.

Change History

comment:1 Changed 2011-06-17T13:31:17-05:00 by bdezonia

This issue points out a larger issue. Anything that subscribes to events needs to know when it is going away so it can unsubscribe from events. Otherwise we have phantom objects taking up memory and any that reference Datasets could take up a lot of memory.

comment:2 Changed 2012-02-26T21:37:08-06:00 by curtis

  • Blocking 995 added

comment:3 Changed 2012-02-26T21:37:13-06:00 by curtis

  • Blocking 995 removed

comment:4 Changed 2012-02-26T21:37:26-06:00 by curtis

  • Blocking 995 added

comment:5 Changed 2012-04-26T09:14:01-05:00 by curtis

  • Status changed from new to closed
  • Resolution set to fixed
  • Milestone changed from imagej-2.0.0-beta3 to imagej-2.0.0-beta2

Fixed in 9777f3ec4680b9d7c60dd8c703970c67cbf29d4c and 21b88c2d8da4401cba8e05c893b3de1654a92c8a, and as of the recent display refactoring (96adb4f7790e4b7ee2a90581715887cd90343a6a - c0985c4668cfa2751829951f5aaa2d237ca34464) should be working.