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 50649 - NbJMIResultItem$ClassResultItem retains FastImportDialog
Summary: NbJMIResultItem$ClassResultItem retains FastImportDialog
Status: RESOLVED WONTFIX
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 4.x
Hardware: PC Linux
: P4 blocker (vote)
Assignee: issues@editor
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2004-10-20 12:28 UTC by _ rkubacki
Modified: 2007-11-05 13:44 UTC (History)
1 user (show)

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 _ rkubacki 2004-10-20 12:28:57 UTC
dev build from Oct 20 sources, JDK 1.5.0

If you try to add import using fast import dialog
the dialog is not GC'ed because it is held by
NbJMIResultItem$ClassResultItem. It would be much
better to clear references like this one to make
memory management easier. Megabytes of memory
allocated in thounds of object are reachable by
the dialog so the GC has obviously harder work.
The chain of references that holds the dialog
instance:

org.netbeans.modules.editor.java.NbJMIResultItem$ClassResultItem.classComponent->
org.netbeans.modules.editor.java.NbJMIPaintComponent$NbClassPaintComponent@ac5->
javax.swing.CellRendererPane@2320->
org.netbeans.editor.ext.ListCompletionView@3fae->
java.awt.AWTEventMulticaster@7392->
org.netbeans.editor.ext.java.JavaFastImport$1@cb35->
org.netbeans.modules.editor.java.NbJavaJMIFastImport@15f28->
org.netbeans.core.windows.services.NbDialog@170a5
Comment 1 Antonin Nebuzelsky 2004-11-02 17:07:36 UTC
Radime, megabytes of memory are not GCed because this dialog is not
GCed? Quite severe leak, isn't it? I know that the instances are
perhaps not cumulating with each invocation, but still first time you
invoke it the objects are never collected... P2?
Comment 2 Martin Roskanin 2004-11-03 16:23:11 UTC
It seems it is JDK problem reported against JDK 1.4.2:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5044798
and it seems the fix wasn't propagated into the JDK 1.5.0 yet

The renderer pane holds the paint component and does not remove it. 

In our case the fast open dialog is hold until the completion is not
invoked. After this, completion is hold and so on... :-)

Closing as WONTFIX