8002146: javadoc doesn't release resources in a timely manner
authorjjg
Sat, 03 Nov 2012 21:07:30 -0700
changeset 14441 6c066a762e05
parent 14440 c929e663eff3
child 14442 6dc10c88c07a
8002146: javadoc doesn't release resources in a timely manner Reviewed-by: darcy
langtools/src/share/classes/com/sun/tools/javadoc/JavadocMemberEnter.java
langtools/src/share/classes/com/sun/tools/javadoc/Start.java
--- a/langtools/src/share/classes/com/sun/tools/javadoc/JavadocMemberEnter.java	Fri Nov 02 19:17:03 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javadoc/JavadocMemberEnter.java	Sat Nov 03 21:07:30 2012 -0700
@@ -81,6 +81,9 @@
             docenv.makeAnnotationTypeElementDoc(meth, docComment, tree, lineMap);
         else
             docenv.makeMethodDoc(meth, docComment, tree, lineMap);
+
+        // release resources
+        tree.body = null;
     }
 
     @Override
--- a/langtools/src/share/classes/com/sun/tools/javadoc/Start.java	Fri Nov 02 19:17:03 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javadoc/Start.java	Sat Nov 03 21:07:30 2012 -0700
@@ -394,6 +394,9 @@
                 // legacy?
                 languageVersion == null || languageVersion == LanguageVersion.JAVA_1_1, quiet);
 
+        // release resources
+        comp = null;
+
         // pass off control to the doclet
         boolean ok = root != null;
         if (ok) ok = docletInvoker.start(root);