This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Repetitive right-clicking on a java node in Projects tab leaves instances of PasteAction$ActSubMenuModel in memory. See the attached screenshot of OptimizeIt window.
Created attachment 16888 [details] Reference graph for a leaked instance of PasteAction$ActSubMenuModel
Petr you must not ever hold onto a presenter from the action itself. If the presenter needs to listen to something it can. (Probably it shouldn't be, anyway - the popup presenter should be created each time the context menu is requested, at least if you are using ContextAwareAction correctly. There is no need to cache it.)
Might be, but probably int't the only problem. The actions themselves are cummuating as well. I'm working on it.
Made some changes and now the ref. graph looks diffrent.
Created attachment 16921 [details] New ref. graf
cvs -q ci -m "#47314: Using weak listener to allow the action to disappear when a popup menu is closed" <-- PasteAction.java new revision: 1.54; previous revision: 1.53 done Processing log script arguments... More commits to come... Checking in test/unit/src/org/openide/actions/PasteActionTest.java; /cvs/openide/test/unit/src/org/openide/actions/PasteActionTest.java,v <-- PasteActionTest.java new revision: 1.6; previous revision: 1.5 done
Verified.