[kepler-dev] [Bug 5095] test kepler and wrp for memory leaks

bugzilla-daemon at ecoinformatics.org bugzilla-daemon at ecoinformatics.org
Fri Mar 4 16:43:22 PST 2011


http://bugzilla.ecoinformatics.org/show_bug.cgi?id=5095

--- Comment #29 from Aaron <aschultz at nceas.ucsb.edu> 2011-03-04 16:43:21 PST ---
Many ActionListeners hold references to the main Top frame, especially in the
menus.  Our menu system is pretty funky since it is laid over the top of
ptolemy.  Many menuitems are laying around in memory not doing anything
(because they are generated by ptolemy but ignored by kepler) and they have
ActionListeners that Swing holds onto in it's memory unless you specifically
remove them.  Systematically removing actionListeners when the window is closed
seems to help but still hasn't freed up the Top JFrame from memory yet.

Also, ptolemy.gui.Top calls it's private method _populateHistory which
generates a menu item that has a HistoryMenuListener.  That listener never gets
garbage collected and I can't figure out how to get to it to remove it so I
plan to just override that method in KeplerGraphFrame and have it do nothing. 
Then that listener (which kepler isn't using anyway) will never be created in
the first place.

Also, getContentPane().removeAll() is never called anywhere in ptolemy, I've
read that it is a good thing to call after closing a window for memory sake. 
(but I tried it and it still doesn't free up the main Top frame)

Have to clean up all my code before checking it in...

-- 
Configure bugmail: http://bugzilla.ecoinformatics.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the Kepler-dev mailing list