Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 124713 - Memory leak in some refactoring cache
Memory leak in some refactoring cache
Status: RESOLVED FIXED
Product: editor
Classification: Unclassified
Component: Refactoring
6.x
All All
: P2 (vote)
: 6.x
Assigned To: issues@java
issues@java
perfleak
: PERFORMANCE, TEST
Depends on:
Blocks: 121855
  Show dependency treegraph
 
Reported: 2008-01-04 15:10 UTC by Jaroslav Tulach
Modified: 2008-01-24 14:42 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jaroslav Tulach 2008-01-04 15:10:48 UTC
After running test described in issue 121855 one gets memory leak:


private static org.netbeans.modules.refactoring.spi.impl.UndoManager 
org.netbeans.modules.refactoring.spi.impl.UndoManager.instance->
org.netbeans.modules.refactoring.spi.impl.UndoManager@1c86638-fileObjectToCES->
java.util.HashMap@ec0608-table->
[Ljava.util.HashMap$Entry;@fb8863-[7]->
java.util.HashMap$Entry@f612ab-value->
org.netbeans.modules.java.JavaDataObject$JavaEditorSupport@10c34c9-obj->
org.netbeans.modules.java.JavaDataObject@1e131b5-nodeDelegate->
org.netbeans.modules.java.JavaNode@1e2173f-status->
org.netbeans.spi.project.support.ant.GlobFileBuiltQuery$StatusImpl@8ae265-this$0->
org.netbeans.spi.project.support.ant.GlobFileBuiltQuery@590c66-eval->
org.netbeans.spi.project.support.ant.PropertyUtils$SequentialPropertyEvaluator@158b772-listeners->
java.util.ArrayList@2d41f8-elementData->
[Ljava.lang.Object;@c85974-[12]->
org.netbeans.modules.java.j2seproject.MainClassUpdater@8bfb0a-project->
org.netbeans.modules.java.j2seproject.J2SEProject@1ad37f6
Comment 1 Jan Becicka 2008-01-04 15:34:02 UTC
Jardo, this is not memory leak.
UndoManager holds this data intentionaly as long as Refactoring Undo is available.

Maybe I can clear UndoManager when projects are being closed...


Comment 2 Jaroslav Tulach 2008-01-06 21:07:42 UTC
Right now it looks a bit like memory leak. How to clear the Refactoring Unco cache? Type something in editor? That is 
had to do when every project and source file is closed. Any other, simpler gesture to clear it? If not, then I agree 
it is good idea to clear the undo when some project is closed.

Comment 3 Jan Becicka 2008-01-24 14:42:00 UTC
Fixed I hope.

Checking in src/org/netbeans/modules/refactoring/spi/impl/UndoManager.java;
/cvs/refactoring/api/src/org/netbeans/modules/refactoring/spi/impl/UndoManager.java,v  <--  UndoManager.java
new revision: 1.9; previous revision: 1.8
done
Checking in nbproject/project.xml;
/cvs/refactoring/api/nbproject/project.xml,v  <--  project.xml
new revision: 1.14; previous revision: 1.13
done


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo