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

Loader and QObjectMethod::method_destroy() use deleteLater() on their objects, preventing timely cleanup of the compilation unit

    XMLWordPrintable

Details

    • iOS/tvOS/watchOS, Linux/Wayland

    Description

      Function trimComponentCache does not clean unloaded components' cache, old versions are loaded after change. Function clearComponentCache works.

      Issue occurs with Loader with following qml js code.

      loader.source = ""
      Cache.trim() // Wrapper for  trimComponentCache
      loader.source = componentUrl

      Also it occurs with manually creating component

      object.destroy()
      // Here I tried asynchronously waiting time, calling gc() and setting object to undefined, nothing of that helped
      Cache.trim()
      var comp = Qt.createComponent(componentUrl, Component.PreferSynchronous)
      object = comp.createObject()

      I'm attaching minimal example with Loader, with two reload buttons, one clearComponentCache, other with trimComponentCache. First one works, second does not

      Attachments

        1. Nomnom.zip
          2 kB
          Evgeniy Nuromskiy
        2. Nomnom-1.zip
          3 kB
          Evgeniy Nuromskiy
        3. Nomnom-qt5.zip
          3 kB
          Evgeniy Nuromskiy
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qtqmlteam Qt Qml Team User
            alteve3di Evgeniy Nuromskiy
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes