Unfortunately, the leak can't be worked around without changing the C++ code in 
QDeclarativeXmlListModel itself to change the xquery expressions that are 
actually used to read a query. To avoid the leak you'd have to avoid using 
XmlListModel, e.g. by using XMLHttpRequest to fetch and read the XML yourself, 
which involves a lot more work.

regards,

Bea

On 19/05/2011, at 5:37 AM, ext Sudheer K. wrote:

> I developed a widget for Maemo which is dependent on XMLListModel. The widget
> pulls stock quotes from Yahoo finance in regular intervals. Due to a known 
> issue
> with XMLListModel [1], there is a memory leak every time the model is 
> reloaded.
> However, I have to reload the model to get the latest quotes.
> 
> I am aware that this memory leak will be fixed in Qt 4.8.0. However, I don't
> know if/when Maemo will get the Qt update. Until then, I am looking for a
> workaround to avoid the memory leak. Here is a skeleton of my code[2]. Can you
> give me any suggestions?
> 
> ~Sudheer
> 
> [1] - http://bugreports.qt.nokia.com/browse/QTBUG-15191
> [2] - http://pastebin.com/fpPmKj1L
> 
> _______________________________________________
> Qt-qml mailing list
> [email protected]
> http://lists.qt.nokia.com/mailman/listinfo/qt-qml


_______________________________________________
Qt-qml mailing list
[email protected]
http://lists.qt.nokia.com/mailman/listinfo/qt-qml

Reply via email to