[Interest] How to get destructor called in object that was moved to a thread?
Reinhardt Behm
rbehm at hushmail.com
Wed Aug 19 05:26:42 CEST 2015
On Wednesday 19 August 2015 02:15:48 Murphy, Sean wrote:
> > 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.
If this would be the case it would also not what you wanted because the
QThreat object does not live in the thread. It only manages it.
--
Best Regards
Reinhardt Behm
More information about the Interest
mailing list