Details
-
Bug
-
Resolution: Won't Do
-
P4: Low
-
None
-
4.7.3
Description
Hi!
Following seems to leak memory.
Or am I using something incorrectly?
memoryLeakTest.cpp
Code: QXmlQuery query(QXmlQuery::XSLT20); QString p1Name = "pointerBook"; QString p1Value = "Contents"; query.bindVariable(p1Name,QVariant(p1Value)); // Just examples of an xml file and an xslt file. query.setFocus(QUrl(QString("/var/tmp/fileDoc.xml"))); // The following xsl just returns a very simple html page: // <html> and <body> tags would just need to be added e.g. later. query.setQuery(QUrl(QString("/var/tmp/browse.xsl") )); for ( int i = 0; i < 700; i++ ) { QString resString; // The following leaks memory? bool boolRes = query.evaluateTo( &resString ); }
(I have not tried with Qt 4.8.0.)
My code leaks in the Desktop version (Qt 4.7.3, on Ubuntu) and on a Maemo device (N900), on the evaluateTo row.
If the "evaluateTo" row is removed, then the application does not leak.