On Fri, 18 Jul 2025 19:07:19 GMT, Sergey Bylokhov <s...@openjdk.org> wrote:
> Just a code cleanup to reduce the amount of code we need to care about, test, > and support. > > The class sun.java2d.Disposer can use either weak or phantom references. For > many years it has used phantom references by default. > > One reason why weak references were supported is because phantom references > keep a strong reference to the object until the reference is added to the > reference queue and cleared. This behavior changed after the fix for > [JDK-8071507](https://bugs.openjdk.org/browse/JDK-8071507). Now both weak and > phantom references behave the same way when it comes to clearing the > reference to the object. Looks OK. I checked to see if any tests use this, but didn't find any. ------------- Marked as reviewed by prr (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/26394#pullrequestreview-3039058858