[Development] leak in QMetaObject?

Sune Vuorela nospam at vuorela.dk
Thu Jul 14 22:43:52 CEST 2016

On 2016-07-14, Thomas Senyk <thomas.senyk at pelagicore.com> wrote:
>>>> I see neither one nor the other. I see continues 100% consume with no
>>>> memory consumption drop what so ever.
> should "fix" it? .. but I still see 100% cpu and same memory consumption?

I debugged some time ago a case of a unresponsive application (for 30
seconds on a fairly beefy windows machine with sufficient ram)

There was a memory leak that involved leaking connections to lambdas of
the pattern:

m_foo = std::make_shared<SomeQObject>();
(void)connect(m_foo.get(), &SomeQObject::someSignal, [m_foo]() {

But a interesting point here was that after leaking some thousand
objects, the application became crawling when recreating most of the
UI's quickitems. There was still plenty of memory free on the system.

Plugging this leak didn't do much for the memory consumption of the
application, but the speed of the 'recreate ui' didn't slow down over
time any longer, at least within the testing done with that.

(This was qt5.4.1)

I haven't gotten around investigating it any further. But it kind of
feels relevant here.

(I wrote a bit more of that code on http://pusling.com/blog/?p=446
should anyone be curious)

More information about the Development mailing list