Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8362572

Delete the usage of "sun.java2d.reftype" from the sun.java2d.Disposer

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 25
    • client-libs
    • 2d
    • generic
    • generic

      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. However, weak references were not used by default because they could be cleared before the finalizer of the object finished running.

      This behavior changed after the fix for JDK-8071507. Now both weak and phantom references behave the same way when it comes to clearing the reference to the object.

      Because of this, we can remove the implementation that uses weak references. This will make the code simpler and reduce the number of paths we need to test.

            serb Sergey Bylokhov
            serb Sergey Bylokhov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: