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

unregisterResource bug

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • P3: Somewhat important
    • None
    • 5.12.3
    • Build tools: rcc
    • None
    • QtCreator Win10 Desktop Qt5.12.3 MSVC2015 64bit
    • Windows

    Description

      1M There is a test project, development tool QtCreator, compiler Desktop Qt5.12.3 MSVC2015 64bit,

      1. I will convert the picture (.jpg) to be used as image.rcc file for future use.
      2. I encapsulate the registerResource () and unregisterResource () functions in a C++ class.
      3. Use the picture in main.qml in the same way as qrc: Image

      {source: "qrc: /xxx.jpg" cache: false}

      Program running steps and memory changes:
      1. Program running, memory consumption 12.9M
      2.registerResource (image.rcc) (return value true), memory consumption 13.6M
      3. Display the picture (source: "qrc: /xxx.jpg"), the memory footprint is 199.7M
      4. No picture is displayed (source: ""), the memory footprint is 138.1M
      5.unregisterResource (image.rcc) (return value is true), memory usage is 137.3M (at this time, if I keep waiting, in most cases, the memory usage will remain at 137.3M)
      6. Wait for 1 ~ 2s (must wait otherwise, it is invalid), unregisterResource (image.rcc) (return value is false), memory usage is 75.6M
      7. Wait for 1 ~ 2s (must wait otherwise, it is invalid), unregisterResource (image.rcc) (return value is false), memory usage is 13.1M

      Attachments

        Activity

          People

            hjk hjk
            zq2333 Quan Zheng
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: