[Interest] How to get destructor called in object that was moved to a thread?

Murphy, Sean smurphy at walbro.com
Wed Aug 19 04:15:48 CEST 2015


> Where do you delete mine? I see no delete nor any ownership. Note that
> unless you move it back you need to delete it from the body of the new
> thread. If the new thread has a runloop you can also async call the slot mine-
> >deleteLayer().

Yeah, I mistakenly assumed that the moveToThread() call would cause the QThread object to take 
ownership of the "mine" object. So I've got that fixed now using Thiago's suggestion in the response 
following yours.

Thanks,
Sean



More information about the Interest mailing list