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 50050

Summary: Memory leak after running new Project Wizard
Product: projects Reporter: Chris Webster <cwebster>
Component: Generic InfrastructureAssignee: Jiri Rechtacek <jrechtacek>
Status: RESOLVED FIXED    
Severity: blocker CC: ludo
Priority: P2 Keywords: PERFORMANCE
Version: 4.x   
Hardware: PC   
OS: All   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 41535, 48877    
Attachments: proposed patch

Description Chris Webster 2004-10-06 23:21:08 UTC
The NewProjectAction in
org.netbeans.modules.project.ui.actions has a
static variable which strongly references the
wizard currently being run. This variable is set
in the run action but not nullified and thus
wizard descriptors are referenced until the next
time the wizard is run. Perhaps this variable can
be a local variable to run or else nullified after
the wizard completes.
Comment 1 Jiri Rechtacek 2004-10-07 16:01:55 UTC
Created attachment 18132 [details]
proposed patch
Comment 2 Jesse Glick 2004-10-07 16:05:39 UTC
Looks better to me. Why wasn't it that way to begin with? Simpler.
Comment 3 Jiri Rechtacek 2004-10-07 16:30:49 UTC
The static variable which holds NewProjectWizard is useless, wizard
could be constructed for each action invocation.
But there is a problem: if the wizard is newly constructed then the
last project is not memorized. I'm going to fix this bug before commit
this patch. I hope it'll solved ASAP.
Comment 4 Chris Webster 2004-10-07 17:11:35 UTC
From the memory leak perspective this will resolve the issue.
Comment 5 Jiri Rechtacek 2004-10-08 11:07:59 UTC
fixed, the attached patch has been applied and also the problem with
preset template fixed.

Checking in src/org/netbeans/modules/project/ui/TemplatesPanelGUI.java;
/cvs/projects/projectui/src/org/netbeans/modules/project/ui/TemplatesPanelGUI.java,v
 <--  TemplatesPanelGUI.java
new revision: 1.32; previous revision: 1.31
done
Processing log script arguments...
More commits to come...
Checking in src/org/netbeans/modules/project/ui/actions/NewProject.java;
/cvs/projects/projectui/src/org/netbeans/modules/project/ui/actions/NewProject.java,v
 <--  NewProject.java
new revision: 1.14; previous revision: 1.13
done