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 - Memory leak after running new Project Wizard
Summary: Memory leak after running new Project Wizard
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Infrastructure (show other bugs)
Version: 4.x
Hardware: PC All
: P2 blocker (vote)
Assignee: Jiri Rechtacek
URL:
Keywords: PERFORMANCE
Depends on:
Blocks: 41535 48877
  Show dependency tree
 
Reported: 2004-10-06 23:21 UTC by Chris Webster
Modified: 2004-10-08 11:07 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
proposed patch (2.38 KB, patch)
2004-10-07 16:01 UTC, Jiri Rechtacek
Details | Diff

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