RFR: 8362572: Delete the usage of "sun.java2d.reftype" from the sun.java2d.Disposer

Alexey Ivanov aivanov at openjdk.org
Mon Jul 21 20:17:31 UTC 2025


On Fri, 18 Jul 2025 19:07:19 GMT, Sergey Bylokhov <serb at 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.

Marked as reviewed by aivanov (Reviewer).

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

PR Review: https://git.openjdk.org/jdk/pull/26394#pullrequestreview-3039641594


More information about the client-libs-dev mailing list