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 50182 - Memory Leak in TemplateChooserPanelGUI
Summary: Memory Leak in TemplateChooserPanelGUI
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Infrastructure (show other bugs)
Version: 4.x
Hardware: All All
: P2 blocker (vote)
Assignee: Jiri Rechtacek
URL:
Keywords: PERFORMANCE
Depends on:
Blocks: 41535 48877
  Show dependency tree
 
Reported: 2004-10-08 18:58 UTC by Chris Webster
Modified: 2004-10-20 15:32 UTC (History)
3 users (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 Chris Webster 2004-10-08 18:58:47 UTC
I noticed that TemplateChooserPanelGUI uses the
Utilities.attachInitJob, which adds a strongly
reference listener to the AWTEventListener. The
listener is causing a leak each time this is
invoked from the new menu on a project. 

Seems like either the detach can somehow be
invoked when the job is complete or a
WeakReference could be used.
Comment 1 Chris Webster 2004-10-08 19:55:11 UTC
After looking at this a bit more I noticed that the job is never
started, so the easiest solution may be to remove this invocation.
Although, I am not sure about the consequences of this. 
Comment 2 _ rkubacki 2004-10-20 10:38:03 UTC
instance org.netbeans.modules.project.ui.NewFileWizard@2aa58
------------------------------
org.netbeans.modules.project.ui.TemplateChooserPanelGUI.PROJECT_CELL_RENDERER->
org.netbeans.modules.project.ui.TemplateChooserPanelGUI$ProjectCellRenderer@405->
javax.swing.CellRendererPane@192f->
javax.swing.JComboBox@3046->
org.netbeans.modules.project.ui.TemplateChooserPanelGUI@4eb7->
java.beans.PropertyChangeSupport@8d4c->
sun.awt.EventListenerAggregate@f11c->
[Ljava.beans.PropertyChangeListener;@177b4->
org.openide.loaders.TemplateWizard$4@2037c->
org.netbeans.modules.project.ui.NewFileWizard@2aa58
Comment 3 Jiri Rechtacek 2004-10-20 15:32:21 UTC
Radim, thanks for figure out what holds the TemplateChooser panel.

fixed in src/org/netbeans/modules/project/ui/TemplateChooserPanelGUI.java;
/cvs/projects/projectui/src/org/netbeans/modules/project/ui/TemplateChooserPanelGUI.java,v
 <--  TemplateChooserPanelGUI.java
new revision: 1.32; previous revision: 1.31
done