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 124040 - Memory leak in XML templates
Summary: Memory leak in XML templates
Status: RESOLVED FIXED
Alias: None
Product: xml
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Sonali Kochar
URL:
Keywords: PERFORMANCE, TEST
Depends on:
Blocks: 121855
  Show dependency tree
 
Reported: 2007-12-14 16:28 UTC by Jaroslav Tulach
Modified: 2008-01-08 01:10 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
My fix (1.63 KB, patch)
2007-12-14 20:36 UTC, Jaroslav Tulach
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jaroslav Tulach 2007-12-14 16:28:26 UTC
Some static field in XMLWizardIterator prevents closed projects from being garbage collected. Delete that field or 
make it weak reference. 
 
testGCProjects:
      junit.framework.AssertionFailedError: Checking if all projects are really garbage collected Project:
private static org.netbeans.modules.xml.core.wizard.XMLWizardIterator 
org.netbeans.modules.xml.core.wizard.XMLWizardIterator.instance->
org.netbeans.modules.xml.core.wizard.XMLWizardIterator@1131b8-templateWizard->
org.netbeans.modules.project.ui.NewFileWizard@1d14b94-currP->
org.netbeans.modules.java.j2seproject.J2SEProject@f2a08b
Comment 1 Jaroslav Tulach 2007-12-14 20:36:57 UTC
Created attachment 54277 [details]
My fix
Comment 2 Sonali Kochar 2008-01-08 01:10:17 UTC
Fixed
Checking in XMLWizardIterator.java;
/cvs/xml/core/src/org/netbeans/modules/xml/core/wizard/XMLWizardIterator.java,v  <--  XMLWizardIterator.java
new revision: 1.19; previous revision: 1.18
done