Ticket #616 (closed task: fixed)

Opened 9 years ago

Last modified 8 years ago

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 9 years ago 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 8 years ago by curtis

  • Blocking 995 added

comment:3 Changed 8 years ago by curtis

  • Blocking 995 removed

comment:4 Changed 8 years ago by curtis

  • Blocking 995 added

comment:5 Changed 8 years ago 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.

Note: See TracTickets for help on using tickets.