[8u] RFR 8209113: Use WeakReference for lastFontStrike for created Fonts

Zhengyu Gu zgu at redhat.com
Fri Mar 20 22:00:16 UTC 2020


Hi,

I would like to backport this change to JDK8u. This patch fixes a memory 
leak that can be reproduced in 8u.

The original patch does not apply cleanly. Other than location mismatch,
I changed
FontStrikeDisposer.strikeCache type in original patch 
ConcurrentHashMap<FontStrikeDesc, Reference<FontStrike>> =>
ConcurrentHashMap<FontStrikeDesc, Reference>
to match Font2D.strikeCache

Original bug: https://bugs.openjdk.java.net/browse/JDK-8209113
Original code review thread: 
https://mail.openjdk.java.net/pipermail/2d-dev/2019-December/010470.html


8u Webrev: 
http://cr.openjdk.java.net/~zgu/JDK-8209113-8u/webrev.00/index.html

Test:
   The testcase in bug.

Thanks,

-Zhengyu



More information about the jdk8u-dev mailing list