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 35325 - Massive memory leak caused by completion
Summary: Massive memory leak caused by completion
Status: VERIFIED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 3.x
Hardware: All All
: P1 blocker (vote)
Assignee: issues@editor
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2003-08-07 13:25 UTC by Petr Nejedly
Modified: 2007-11-05 13:44 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Nejedly 2003-08-07 13:25:13 UTC
PopupManager inserts JDCPopupPanel to an
EditorWindow's RootPane and never removes it.
But the RootPane is shared between the editors, so
if I leave at least one editor open, all
previously used editors will be kept in memory
referenced from the RootPane's JLayeredPane:
JLayeredPane.component ->
Component[] ->
 0: JDCPopupPanel -> NbEditorUI -> ...
 1: JDCPopupPanel -> NbEditorUI -> ...
 2: JDCPopupPanel -> NbEditorUI -> ...
 3: JDCPopupPanel -> NbEditorUI -> ...
 4: JDCPopupPanel -> NbEditorUI -> ...
...
Comment 1 Petr Nejedly 2003-08-07 13:28:10 UTC
BTW: When combined with issue #35319 leak, the editors remain in
memory even after closing _all_ of them (because one of them is
referenced through image Observer.
Comment 2 Martin Roskanin 2003-08-08 10:19:34 UTC
fixed in [maintrunk]

I have fix the problem of wrong removing from root pane. JDCPopupPanel
and tooltips removes itself from rootpane if they are hidden.

Anyway, NbEditorUI is not finalized for all closed editor windows. It
means that it is referenced from some other object. Petr, this would
need further investigation.

I am closing this issue as the problem of uninstallation from root
pane is fixed. Please open another for further memory leak. 

Thanks,
Mato

/cvs/editor/libsrc/org/netbeans/editor/PopupManager.java,v  <-- 
PopupManager.java
new revision: 1.4; previous revision: 1.3

/cvs/editor/libsrc/org/netbeans/editor/ext/JDCPopupPanel.java,v  <-- 
JDCPopupPanel.java
new revision: 1.19; previous revision: 1.18

/cvs/editor/libsrc/org/netbeans/editor/ext/ToolTipSupport.java,v  <--
 ToolTipSupport.java
new revision: 1.13; previous revision: 1.12
Comment 3 Petr Nejedly 2003-08-08 13:33:39 UTC
OK, I've fetched the fresh bits and I'll try it again.
Comment 4 Petr Nejedly 2003-08-11 16:40:24 UTC
OK, It seems that the "massive" part is gone.
I've tried it and from 23 opened editors on which all I've carefully
used completion, 19 were properly GCed and only 4 remained in memory.
I'll try to investigate what is holding them and file a separate
issue.
Comment 5 Antonin Nebuzelsky 2003-11-04 14:52:33 UTC
Fixed also in Nevada Patch 1 and in Arrow.