[Interest] Fwd: Lambda based connections are not disconnected upon QObject deletion
Thiago Macieira
thiago.macieira at intel.com
Tue Sep 3 18:39:21 CEST 2013
On terça-feira, 3 de setembro de 2013 09:58:28, Philipp Kursawe wrote:
> Using this code:
>
> @
> obj->connect(sender, &Sender::signal, [] {
> });
>
> // later
> obj->deleteLater();
> @
>
> The object will be deleted, but the connection will not be broken, and
> the sender can still signal, the lambda will be called, but of course
> it will crash. Is this a known limitation of using lambdas?
Huh? how can you send a signal after the sender is deleted?
deleteLater() does not mean delete *now*.
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20130903/202184ae/attachment.sig>
More information about the Interest
mailing list