Qt / QTBUG-47645  https://bugreports.qt.io/browse/QTBUG-47645
QStringList has memory leak?

void xccxds::on_pushButton_1_clicked()
{
    QStringList list;
    for (int i=0; i<5000000; i++)  {
        list << QString::number(i);
    }
   QMessageBox::question(NULL, "Test", "finish", QMessageBox::Yes);
}

The program is so simple. But each time, I click the button and the program will use more memory (100K or 2M), never stop increase! That's a serious problem, isn't it?
Please use the Windows Task Manager to observe the use of its memory, setting frequence=high

 

相关文章: