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 105080

Summary: JavaSource$EditorRegistryListener does not allow memory to be freed until a new editor is opened
Product: java Reporter: Shivanand Kini <skini>
Component: SourceAssignee: Jan Lahoda <jlahoda>
Status: RESOLVED DUPLICATE    
Severity: blocker CC: issues
Priority: P1 Keywords: PERFORMANCE
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 105079    
Attachments: Path to the wsdl editor UI from EditorRegistryListener

Description Shivanand Kini 2007-05-29 23:44:58 UTC
JavaSource's EditorRegistryListener has a static lastEditor which keeps the wsdl
editor UI in memory, even after the editor is closed.

Once a new editor (other than wsdl) is opened, then only it removes this reference.

I saw that similiar issue was filed by schema editor and the bug says that its
fixed. But its not.
Comment 1 Shivanand Kini 2007-05-29 23:45:43 UTC
Created attachment 42925 [details]
Path to the wsdl editor UI from EditorRegistryListener
Comment 2 Jan Lahoda 2007-06-04 17:31:11 UTC
Duplicate of issue #100753 (which speaks only about HintsUI, but JavaSource's
lastEditor is the same case).

Please note that this is not P1: this holds at most one component (it is not a
cumulative leak).

*** This issue has been marked as a duplicate of 100753 ***
Comment 3 _ sandipchitale 2007-12-07 22:06:39 UTC
This is causing a leak in VW project also. The scenario is as follows:

1. Create VW project.
2. Create 5 Pages.
3. Click on the Java tabs of each page.
4. Close all pages.
5. Close the project.
6. Take a heap dump and load on NB profiler.
7. Look for instances of class named org.netbeans.modules.visualweb.designer.jsf.ui.JsfTopComponent

One of the instance's is held through the editorRegistryListener of JavaSource.

A P1 bug in VW is dependent on this.
Comment 4 Jan Lahoda 2007-12-07 22:58:18 UTC
A few comments:
-why do you think this is not a dupe of issue #100753?
-I do not think that holding the very last editor (when all other editors are closed) qualifies as P1, as it a) is not a
cumulative memory leak - it only leaks one editor, and if any other editor is opened, it references the opened editor
(at least for plain Java, not sure it is also the case for Visual Web if the user never switches to "Java" tab, I was
unable to confirm this), b) when the user works with the IDE, he/she usually has an opened editor. This is not to say
that it does not look bad when the memory does not drop to the original state, but I am not aware of any case where this
would cause any real trouble.

Comment 5 Jan Lahoda 2007-12-09 20:15:47 UTC

*** This issue has been marked as a duplicate of 100753 ***