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

QFileDialog has memory leak.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P3: Somewhat important
    • Some future release
    • 4.6.2
    • None
    • Windows XP 32-bit. Both static and dynamic versions of Qt compiled with VS 2008.

    Description

      Use of the the static function QFileDialog::getExistingDirectory(...) causes several megabytes of memory to be allocated when the dialog is shown, but this memory is not released afterwards. This bug can easily be demonstrated using the 'StandardDialogs' example which comes with Qt. I have produced the bug using both static and dynamically linked versions of the Qt library (which I built myself) on the Windows platform.

      Please follow the following steps to observe the problem:

      1) Launch the 'Standard Dialogs' example which comes with Qt.
      2) Open the Windows Task Manager and note how much memory is being used (10Mb on my system).
      3) Press the button labelled QFileDialog::getExistingDirectory()
      4) Observe the memory usage increase (to 19Mb on my system).
      5) Press cancel on the dialog. Observe that the memory remains high and does not return to the previous level.

      Note that this procedure only works once per run of the application. To see it again you need to exit the sample application and run it again.

      Attachments

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

        Activity

          People

            menard Alexis Menard (closed Nokia identity) (Inactive)
            esuvs David Williams
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes