Details
-
Bug
-
Resolution: Done
-
P2: Important
-
4.8.1, 5.0.0 Beta 2
-
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.