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 #673 (closed defect: fixed)

Opened 2011-07-18T12:52:36-05:00

Last modified 2011-08-29T10:21:23-05:00

Memory leak in LegacyOutputTracker

Reported by: bdezonia Owned by: bdezonia
Priority: major Milestone: imagej-2.0-alpha5
Component: Legacy Compatibility Version:
Severity: serious Keywords:
Cc: Blocked By:


It turns out that there is a memory leak in LegacyOutputTracker.

To duplicate:
Open Organ Of Corti
Use Delete Axis plugin to delete C axis
close window

If you run the Eclipse Memory Analyzer you can see the event dispatcher keeps a hold of a CompositeImage.

Note that if you remove ThreadLocal variables from LegacyOutputTracker this error goes away. But this would limit us to running only one legacy plugin at a time. Must think how best to track legacy outputs.

Change History

comment:1 Changed 2011-07-18T12:59:54-05:00 by bdezonia

Note that this leak is ever growing. If you run this sequence of commands over and over you lose a couple megabytes of ram each time.

comment:2 Changed 2011-07-18T13:50:04-05:00 by bdezonia

  • Status changed from new to closed
  • Resolution set to fixed

fixed with a hack in e623f73300cca17a04846ce2191e687633d3f0c3

comment:3 Changed 2011-08-01T10:57:37-05:00 by bdezonia

  • Status changed from closed to reopened
  • Resolution fixed deleted

My hack causes other memory leaks. Reopening to make sure any change does not ressurect this behavior.

comment:4 Changed 2011-08-01T11:26:47-05:00 by bdezonia

  • Milestone changed from biweekly-2011: Jul-18 to Jul-29 to biweekly-2011: Aug-01 to Aug-12

comment:5 Changed 2011-08-01T12:10:32-05:00 by curtis

  • Milestone changed from biweekly-2011: Aug-01 to Aug-12 to imagej-2.0-alpha5

Milestone biweekly-2011: Aug-01 to Aug-12 deleted

comment:6 Changed 2011-08-02T10:55:01-05:00 by bdezonia

  • Status changed from reopened to closed
  • Resolution set to fixed

My other fixes did not resurrect this bug. Closing.

comment:7 Changed 2011-08-29T10:21:23-05:00 by bdezonia

"My other fixes" refers to b72c24756c777ff866fe434ac0230107a0fc1fed