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

QRasterPaintEngine appears to live for lifetime of pixmap

XMLWordPrintable

      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.

        1. main.cpp
          0.3 kB
          Martin Jones (closed Nokia identity)
        2. massif.out
          11 kB
          Martin Jones (closed Nokia identity)
        3. smallerbuffers.diff
          14 kB
          Warwick Allison (closed Nokia identity)
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes