Hi there,

I have some problems to understand why my (simplified) logger application increases in memory consumption. I used heaptrack to measure allocations and to track down the source of memory consumption. Closing the application seems to free memory just before closing, so that heaptrack does not show this as a leak.

The project is quite simple and based on QML with an own class derived by QAbstractTableModel providing the messages to a TableView (Qt 5.9.1, QtQuick 2.0).
In this test setup, test messages are pushed to the model in a specific frequency. If the maximum number of messages is reached, old messages are discarded.

Furthermore, I compiled the example using Visual Studio. The memory profiler of VS showed more detailed information. Two screenshots are attached where you can see that QObjectPrivate::Connection and QtPrivate::QSlotObject instances are created by every new message. It seems, they aren't freed if the item gets removed from the model.
I have no idea, if this is as expected and why this function doesn't (seem to) free memory if rows are deleted.

Can anyone help me with this? I'd appreciate any suggestions! Thanks!





Example project zipped: