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

Summary: Memory leak in XML templates
Product: xml Reporter: Jaroslav Tulach <jtulach>
Component: CodeAssignee: Sonali Kochar <sonali>
Status: RESOLVED FIXED    
Severity: blocker Keywords: PERFORMANCE, TEST
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 121855    
Attachments: My fix

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