Memory Leak With Eclipse Theme

Hi, I’ve just start using DockingFrames and want to congratulate you on an awesome framework. I’ve managed to convert a full scale enterprise app over to the framework in less than a week.

Before going live with a new version I was doing some profiling with the YourKit profiler and noticed that when using the eclipse our MultipleCDockables were not getting garbage collected after the windows had been closed. (They are getting cleaned in the flat theme).

YourKit point to the class bibliothek.extension.gui.dock.theme.eclipse.RoundRectButton still raining a link to the dockable but I haven’t been able to track down where the link is.

Here is a screenshot of the YourKit window showing the references.

I’m using 1.1.1p6.

ANy help in tracking this down would be great.

Thanks

Chris Dallimore

I’m not here during the weekend, but I’ll try to find out more on monday. A memory leak certainly has the highest possible priority.

It’s already wrong that a RoundRectButton still exists, because all buttons should be deleted once a Dockable is no longer visible. The PropertyValue$1 is a strong hint: RoundRectButtons install observers to a global properties-map, this allows them to read things like their color, and to update these properties if the client changes the configuration. It may be, that one of these observers is not cleaned up correctly. Since this would only affect RoundRectButton, and this button is only used by the EclipseTheme, it would explain all the issues.

Anyways, thanks for pointing out this memory leak, I had no clue of this issue.

Btw. I’m always interested in publishing screenshots of big impressive applications using DockingFrames :wink:

Thanks for your help. There is no real urgency at this end as I’m still updating other parts of the code.

If there is anymore information I can give just let me know.

I’ll send through a screenshot once I have everything running

I think I found the bug, at least in my profiler the dockables are now cleaned up. It really was the listener which was not removed properly. I’ll upload the fixed version - 1.1.1p6a - within the next 24 hours.

Thanks heaps, I’ll give it a shot and let you know how y profiling goes.

As promised here is a screen shot of our application the Aquatic Realtime Management System

Key technologies you can see are

  • jsyntaxpane for xml editing
  • NASA’s worldwind for 3D map viewing
  • JFreeCHart for plotting.

Chris

Hi, i’ve downloaded 6a and run it through YourKit and it looks like everything is now working pefectly.

Thanks heaps for the quick fix.

Chris

Nice application you wrote. You deliberately replaced the border of floating Dockables with the operation systems default?

Yeh I modified the DefaultScreenDockWindowFactory to create frames for a few reasons

  • On my mac even with the dialog.setAlwaysOnTop(false) the external dockables were always in front of the main application window
  • So I could add a menu bar
  • Before using the framework some of the windows that were now dockables were JFrames so this is what our users are used to seeing

Thanks again for your help

Chris