Unsolved Why the delegate component is eating up my memory
-
I've created a panel to view users information everytime a user connects. I've noticed that memory leakage occurs everytime a user disconnects so I debugged the whole c++ code to find out what is causing the memory leak. And now I figured out that QML delegate portion is the causing the leak.
Here is my delegate:
I've created a delegate like below.
Component { id: itemDelegate Row { .. Rectangle { ... Text { id: name text: modelData.name } MouseArea { anchors.fill: parent onClicked: list.currentIndex = index } } } }
If I replace the Component with Item, leakage stops but then I'm unable to use the above as a delegate.
Here is the simplified form of my ListView
ListView { id: list model: Wrapper.mypersons delegate: itemDelegate highlight: Rectangle {..} }
Every time a user info is shown, my memory consumption increase by some ~3-4MBs but when the user is removed from the view, the memory doesn't rollback.
Any help would be appreciated.