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

QML Memory leak

    XMLWordPrintable

    Details

    • Commits:
      d50a57f408a9cc160c187c012f51b8fa89738858 23e0e26ce652cf360310ebb1e2de8283502eba2e

      Description

      As mentioned in QTBUG-28712, the following also leaks in the new QML engine:

      import QtQuick 2.2
      import QtQuick.Window 2.2
      
      Window {
          id: top
          visible: true
          width: 200; height: 200
          color: "white"
          property variant item
      
          Timer {
              id: timer
              running: true
      	repeat: true
              interval: 1
              onTriggered: {
                  if(item)
                      item.destroy();
      	    else
      		item = Qt.createQmlObject('
      			    import QtQuick 2.2
      			    Rectangle
      			    {
      				width: 100
      				height: 100
      				color: "blue"
      				anchors.centerIn: parent
      
      				function test()
      				{
      				    var t="t";
      				    var b = [];
      				}
      			    }
      			    ',
      					    top);
              }
          }
      }
      

        Attachments

        1. qtbug42055.tar.gz
          1 kB
        2. memleak.tgz
          1 kB
        3. bad.png
          bad.png
          442 kB
        4. base.png
          base.png
          570 kB
        5. good.png
          good.png
          448 kB
        6. heaptrack.bad.gz
          4.39 MB
        7. heaptrack.base.gz
          540 kB
        8. heaptrack.good.gz
          4.53 MB
        9. massif.tar.xz
          2.17 MB

          Issue Links

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

            Activity

              People

              Assignee:
              ulherman Ulf Hermann
              Reporter:
              shausman Simon Hausmann
              Votes:
              12 Vote for this issue
              Watchers:
              26 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes