Memory leak in jdk.javadoc.internal.doclets.toolkit.WorkArounds
Jonathan Gibbons
jonathan.gibbons at oracle.com
Sun Sep 29 14:35:42 UTC 2019
On 9/28/19 2:01 AM, Florian Weimer wrote:
> * Jonathan Gibbons:
>
>> Florian,
>>
>> I looked at the code: this is definitely a design bug.
>>
>> There appears to be no reason for it to be static, and removing the
>> `static` modifier
>> does not cause any compilation issues.
>>
>> There's some minor cleanup we could do in this area as well, to use
>> Map::computeIfAbsent,
>>
>> Filed: https://bugs.openjdk.java.net/browse/JDK-8231587
> Thanks.
>
> I removed the static keyword and the leak is gone if I do not reuse
> the DocumentationTool object. However, there is still a leak if I
> recycle the tool object. (This does not happen with the javac tool
> object, I think.)
>
> So it's an improvement in the sense that there is now an easy
> workaround, but the fix isn't quite complete yet.
Thanks for the update.
I'll address the leak from the static map first, and then (separately)
set up a test to investigate any remaining leaks.
-- Jon
More information about the javadoc-dev
mailing list