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

Release HDC from passiveDCList sooner

    XMLWordPrintable

Details

    • 2d
    • b13
    • windows

    Description

      When a DC becomes unused, it is moved from activeDCList to passiveDCList to be released later. It will stay in the passiveDCList until a new DC is requested for the same window or the window is destroyed.

      In a scenario where several windows are created, shown, and then hidden, the stale DCs will be in the passiveDCList for quite a while. These DC will never be used again, they will be released sooner or later.

      Thus we can release all DC from passiveDCList when a request for a new DC is received. It will reduce Java usage of GDI resources.

      Attachments

        1. ManyFramesTest.java
          1 kB
        2. printHDC.diff
          4 kB
        3. printHDC.log
          12 kB

        Issue Links

          Activity

            People

              aivanov Alexey Ivanov
              aivanov Alexey Ivanov
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: