Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
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