After a bit of a debugging session, I ended up looking at some code in a large project
1 2 3 4 5 |
m_foo = std::make_shared<SomeQObject>(); /* plenty of lines and function boundaries left out */ (void)connect(m_foo.get(), &SomeQObject::someSignal, [m_foo]() { /* */ }); |
The connection gets removed when the pointer inside m_foo gets de-allocated by the shared_ptr. But the connection target is a lambda…
Recent Comments