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

Memory leak in QXmlStreamReader

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.1.0
    • 4.8.1, 5.0.0 Beta 2
    • Core: Other
    • None

    Description

      When repeatedly using the same QXmlStreamReader instance to read xml documents by calling addData() and clear(), the memory consumption grows with every iteration.

      I've pinpointed the problem to the tagStackStringStorage member of QXmlStreamReaderPrivate, which is inherited from QXmlStreamPrivateTagStack.

      When you run the attached program in a debugger, you can see that stream.d_ptr.d->tagStackStringStorage.d->alloc continues to grow.

      I suspect this could be fixed by adding tagStackStringStorage.clear() to QXmlStreamReaderPrivate::init(), but I have not tested that.

      Attachments

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

        Activity

          People

            nierob Nierob
            mschmitzer Marc Schmitzer
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes