On Wed, 25 Feb 2026 00:52:24 GMT, Phil Race <[email protected]> wrote:

> Update a cache in GlyphLayout.java to use a WeakHashMap
> The maximum cache size is also reduced.
> The intention is to allow Fonts loaded via Font.createFont() to be collected 
> once the application drops references.

I'm not sure about the thread safety of `cacheRef`. Is there a reason that it's 
not declared final and initialized immediately in the declaration? It's inside 
of `SDCache`, so it wouldn't be initialized unless needed anyway (nested static 
class lazy init).

-------------

PR Comment: https://git.openjdk.org/jdk/pull/29904#issuecomment-3972890895

Reply via email to