On terça-feira, 3 de setembro de 2013 09:39:21, Thiago Macieira wrote:
> 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*.

Ah, sorry, after reading Constantin's email, I see what you meant.

I took the lambda in the example to be literal. I did not see how emitting the 
signal from Sender would crash, since the lambda didn't do anything.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to