diff --git a/src/share/classes/com/sun/tools/javadoc/JavadocMemberEnter.java b/src/share/classes/com/sun/tools/javadoc/JavadocMemberEnter.java index e29ae0054021e8b8d5ae0e5b9b5ca6ad9a764b0b..bb4eee23cc3fb787325b71353cb956cbbfb89f54 100644 --- a/src/share/classes/com/sun/tools/javadoc/JavadocMemberEnter.java +++ b/src/share/classes/com/sun/tools/javadoc/JavadocMemberEnter.java @@ -81,6 +81,9 @@ public class JavadocMemberEnter extends MemberEnter { docenv.makeAnnotationTypeElementDoc(meth, docComment, tree, lineMap); else docenv.makeMethodDoc(meth, docComment, tree, lineMap); + + // release resources + tree.body = null; } @Override diff --git a/src/share/classes/com/sun/tools/javadoc/Start.java b/src/share/classes/com/sun/tools/javadoc/Start.java index 67f5e4cc40acf81025f6b0b1cdbf55467191a1a6..44c55d19d015f2af99a5d2b6df1373a3b03de652 100644 --- a/src/share/classes/com/sun/tools/javadoc/Start.java +++ b/src/share/classes/com/sun/tools/javadoc/Start.java @@ -394,6 +394,9 @@ class Start { // 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);