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

Memory Leak in QPlainText

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • P2: Important
    • None
    • 5.0.2
    • GUI: Text handling
    • None

    Description

      QPlainText does not release memory when removing lines.

      This only happens with Qt 5.0.2 and windows (both MSVC and mingw compilers), and does not affect linux.

      Example:

          forever{
              ui->plainTextEdit->appendPlainText("DO I LEAK?");
              if(i > 1000){
                  ui->plainTextEdit->clear();
                  i = 0;
              }
              i++;
          }
      

      When running this example it begin to consume RAM till the end.

      If QPlainTextEdit::maximumBlockCount is set behavior is same, lines are removed but memory is not freeing.

      Attachments

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

        Activity

          People

            chehrlic Christian Ehrlicher
            kryksyh Dmitry Makarenko
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes