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.

Bug 47314 - PasteAction$ActSubMenuModel is leaking from java node popup
Summary: PasteAction$ActSubMenuModel is leaking from java node popup
Status: CLOSED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Infrastructure (show other bugs)
Version: 4.x
Hardware: PC All
: P2 blocker (vote)
Assignee: Jaroslav Tulach
URL:
Keywords: PERFORMANCE
Depends on:
Blocks: 41535
  Show dependency tree
 
Reported: 2004-08-17 14:54 UTC by Antonin Nebuzelsky
Modified: 2006-03-24 10:11 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Reference graph for a leaked instance of PasteAction$ActSubMenuModel (84.89 KB, image/png)
2004-08-17 14:56 UTC, Antonin Nebuzelsky
Details
New ref. graf (361.40 KB, image/jpeg)
2004-08-18 15:02 UTC, Petr Hrebejk
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Antonin Nebuzelsky 2004-08-17 14:54:55 UTC
Repetitive right-clicking on a java node in
Projects tab leaves instances of
PasteAction$ActSubMenuModel in memory. See the
attached screenshot of OptimizeIt window.
Comment 1 Antonin Nebuzelsky 2004-08-17 14:56:03 UTC
Created attachment 16888 [details]
Reference graph for a leaked instance of PasteAction$ActSubMenuModel
Comment 2 Jesse Glick 2004-08-17 17:02:43 UTC
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.)
Comment 3 Petr Hrebejk 2004-08-18 10:15:22 UTC
Might be, but probably int't the only problem. The actions themselves
are cummuating as well. I'm working on it.
Comment 4 Petr Hrebejk 2004-08-18 15:01:02 UTC
Made some changes and now the ref. graph looks diffrent. 
Comment 5 Petr Hrebejk 2004-08-18 15:02:11 UTC
Created attachment 16921 [details]
New ref. graf
Comment 6 Jaroslav Tulach 2004-08-19 14:21:54 UTC
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
Comment 7 Antonin Nebuzelsky 2004-08-20 14:50:49 UTC
Verified.