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

QML Memory leak

XMLWordPrintable

    • d50a57f408a9cc160c187c012f51b8fa89738858 23e0e26ce652cf360310ebb1e2de8283502eba2e

      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);
              }
          }
      }
      

        1. qtbug42055.tar.gz
          1 kB
        2. memleak.tgz
          1 kB
        3. massif.tar.xz
          2.17 MB
        4. heaptrack.good.gz
          4.53 MB
        5. heaptrack.base.gz
          540 kB
        6. heaptrack.bad.gz
          4.39 MB
        7. good.png
          good.png
          448 kB
        8. base.png
          base.png
          570 kB
        9. bad.png
          bad.png
          442 kB
        For Gerrit Dashboard: QTBUG-42055
        # Subject Branch Project Status CR V

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes