[Qt-qml] Memory problem with repeated creation and destruction of ListView's

Serge qt at paccalin.info
Mon Jul 25 17:15:19 CEST 2011


Qt 4.7.3, Windows
Qt 4.7.2, Linux fedora

I have a problem with a program we are currently developing here. We 
repeatedly create and destroy ListView's and it seems that memory is 
leaking.

Our code is in C++ (with QDeclarativeComponent::create), but one of my 
co-workers wrote a QML-only version that exhibits the problem in 
QMLViewer. I attached the two QML files to the present message. Load the 
memory_leak.qml file in QMLViewer and press Return repeatedly (or hold 
it down) to create ListView's from TemplateListView.qml.

If you check the memory used by the QMLViewer process, you will see it 
increase in time. You can add pictures in the model/view to make it more 
obvious.

What are we doing wrong?

-- 
Serge

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: memory_leak.qml
Url: http://lists.qt.nokia.com/pipermail/qt-qml/attachments/20110725/c10eca2e/attachment.pl 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: TemplateListView.qml
Url: http://lists.qt.nokia.com/pipermail/qt-qml/attachments/20110725/c10eca2e/attachment-0001.pl 


More information about the Qt-qml mailing list