RFR: JDK-8231587: Memory leak in WorkArounds.serializedForms

Jonathan Gibbons jonathan.gibbons at oracle.com
Mon Oct 14 19:55:30 UTC 2019


Please review a simple fix, and some code cleanup, for a memory leak in 
javadoc.

The leak was first noted by Florian in the mail thread here:
https://mail.openjdk.java.net/pipermail/javadoc-dev/2019-September/001142.html

The primary part of the fix is (just) the removal of the unnecessary 
'static' modifier.

The remainder of the fix is to introduce a local method to access a 
NewSerializedForm
object, creating it if needed, and to remove an unnecessary "utils" 
parameter from the
internal methods.  There's more cleanup that could be done, but I'm 
trying to keep this
patch simple for now. (For example, rename NewSerializedForm to 
SerializedForm,
and expose it more directly, instead of wrapping it.)

-- Jon

JBS: https://bugs.openjdk.java.net/browse/JDK-8231587
Webrev: http://cr.openjdk.java.net/~jjg/8231587/webrev.00/index.html



More information about the javadoc-dev mailing list