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

Remove unused focusedWindow field in glass Window to avoid leak

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: openjfx14
    • Fix Version/s: openjfx16
    • Component/s: javafx
    • Labels:

      Description

      This is a follow-up bug to JDK-8241840 which fixed a memory leak for the Monocle glass platform by not calling the method that sets the focusedWindow to the current window unless that window is visible.

      An earlier fix applied this change to the platform-independent code, but it seemed better to fix the bug in Monocle itself, thus this follow-up issue.

      Since the focusedWindow field in the Windows platform isn't used at all, it only serves as a possible source of memory leak with no benefit. We should remove this unused field, along with the setter and getter methods, from the platform-independent Window class.

      Monocle already tracks the focused Window itself and doesn't even use the one in the Window class.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                kcr Kevin Rushforth
                Reporter:
                kcr Kevin Rushforth
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: