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

QWizard creates memory leak via QVistaHelper

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 4.7.0
    • 4.6.2
    • None
    • None
    • 6bc32600d2367e78ddc39dd93694e01d4d75958d

    Description

      Hi,

      We've discovered a memory leak, reproducable on Windows-XP via this little program and Qt4.6.2:

      int main(int argc, char *argv[])
      {
      _CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );
      QApplication a(argc, argv);
      QWizard wiz;
      return 0;
      }

      I think we also found the reason. In QWizardPrivate::init() the line 682 creates the QVistaHelper-instance which is never released.
      vistaHelper = new QVistaHelper(q);

      Passing the wizard as parent for the QObject seems to fix the issue for us. (qwizard_win.cpp, line 239)
      QVistaHelper::QVistaHelper(QWizard *wizard)
      + : QObject(wizard) // register with the parent
      , pressed(false)
      , wizard(wizard)
      , backButton_(0)
      {

      Is this correct?

      Best regards,
      Joachim

      Attachments

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

        Activity

          People

            bhughes Bradley T. Hughes (closed Nokia Identity) (Inactive)
            joachim Joachim Eibl
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes