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 - JavaSource$EditorRegistryListener does not allow memory to be freed until a new editor is opened
Summary: JavaSource$EditorRegistryListener does not allow memory to be freed until a n...
Status: RESOLVED DUPLICATE of bug 100753
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: Jan Lahoda
URL:
Keywords: PERFORMANCE
Depends on:
Blocks: 105079
  Show dependency tree
 
Reported: 2007-05-29 23:44 UTC by Shivanand Kini
Modified: 2007-12-10 07:02 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Path to the wsdl editor UI from EditorRegistryListener (31.33 KB, image/png)
2007-05-29 23:45 UTC, Shivanand Kini
Details

Note You need to log in before you can comment on or make changes to this bug.
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 ***