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

The canvas component method getImageData() will not release the frame buffer from system memory.

XMLWordPrintable

    • eee4e767a (dev), 3d9887a25 (6.10), bdbb4c7bf (tqtc/lts-6.8)

      The below snippet will eat memory every time the timer is triggered. Garbage collection is not acting as a mediator either.

      import QtQuick 2.0
      
      Item {
          width: 400
          height: 400
      
          Canvas {
              id: canvas
              renderStrategy: Canvas.Immediate
              anchors.fill: parent
              onPaint: { }
          }
      
          Timer {
              running: true
              interval: 100
              repeat: true
              onTriggered: canvas.getContext("2d").getImageData(0, 0, canvas.width, canvas.height)
          }
      }
      

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

            fabiankosmale Fabian Kosmale
            surgemcgee Robert Steckroth
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes