Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-10215

QRasterPaintEngine appears to live for lifetime of pixmap

    XMLWordPrintable

Details

    Description

      If you create a pixmap and paint into it, the paint engine created to do the painting seems to remain for the life of the pixmap. If you create quite a lot of small pixmaps (like QML) and keep them unchanged for the duration of the application there is a large, unnecessary memory waste.

      This also affects QX11PaintEngine and presumably others.

      The attachments show a massif run which creates 200 small pixmaps. The paint engines are not released unless the pixmaps are destroyed, so that while there is an expected 2MB of storage used for the pixmaps, an additional 4MB is taken by unused engine paraphernalia.

      Attachments

        1. main.cpp
          0.3 kB
        2. massif.out
          11 kB
        3. smallerbuffers.diff
          14 kB

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              wallison Warwick Allison (closed Nokia identity) (Inactive)
              martjone Martin Jones (closed Nokia identity) (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes