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

QML Text Memory leak

    XMLWordPrintable

Details

    • macOS, Windows
    • 22e27fed5 (dev)

    Description

      Memory leak occurs when QML Text overlaps and do not overlap repeatedly.

      Memory leak does not happen if
      1. Text does not overlap at all
      2. Text overlaps all the time
      3. Repeat Text overlap&no overlap another Text

      Here's sample code
      main.qml

              Repeater {
                  model: itemCount
                  SubItem {
                      x: Math.floor(index / lineCount) * 90
                      y: index % lineCount * 15
                  }
              }
      

      SubItem.qml

      Item {
          height: 15
          width: 170
          Text {
              id: text1
              width: 80
              height: 15
              text: "ABCDE"
              ....
          }
      
          Text {
              id: text2
              // 1. no overlap : no memory leak
              //width: 88
              
              //  overlap <> no overlap : memory leak **
              width: 80
      
              // 2. always overlap : no memory leak
              //width: 40
      
              // 3. overlap <> no overlap another SubItem text : no memory leak
              //width: 170
              
              height: 15
               ...
          }
      
          Timer {
              interval: 25
              running: true
              repeat: true
              onTriggered: {
                  text2.text = Math.floor(Math.random() * 65536 - 32768)
              }
          }
      }
      

      Heob result( Memory_leak_heob_result.zip) and sample project is attached( Qtbug107214-TextMemoryLeak.zip )

      Attachments

        Issue Links

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

          Activity

            People

              esabraha Eskil Abrahamsen Blomfeldt
              nagrohn Nahomi Gröhn (Inactive)
              Votes:
              4 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes