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

2015-08-19 Thread Allan Sandfeld Jensen
On Wednesday 19 August 2015, 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- > > > > >del

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

2015-08-18 Thread Reinhardt Behm
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-> > >

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

2015-08-18 Thread Murphy, Sean
> 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() ca

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

2015-08-18 Thread Murphy, Sean
> On Monday 17 August 2015 21:34:17 Murphy, Sean wrote: > > I'm struggling to get my destructor called in a class of mine that is > > moved to a separate thread > > You must call it in the thread that the object is associated with. > > > My mainwindow's .cpp file: > > MainWindow::MainWindow(QWidg

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

2015-08-17 Thread Thiago Macieira
On Monday 17 August 2015 21:34:17 Murphy, Sean wrote: > I'm struggling to get my destructor called in a class of mine that is moved > to a separate thread You must call it in the thread that the object is associated with. > My mainwindow's .cpp file: > MainWindow::MainWindow(QWidget *parent) > {

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

2015-08-17 Thread Allan Sandfeld Jensen
On Monday 17 August 2015, Murphy, Sean wrote: > I'm struggling to get my destructor called in a class of mine that is moved > to a separate thread > > In my class's header file: > class myClass > { > Q_OBJECT > ... > } > > In my class's .cpp file: > myClass::~myClass() > { > qDebug("myClass

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

2015-08-17 Thread Murphy, Sean
I'm struggling to get my destructor called in a class of mine that is moved to a separate thread In my class's header file: class myClass { Q_OBJECT ... } In my class's .cpp file: myClass::~myClass() { qDebug("myClass destructor"); } MainWindow.h: QThread* myThread; myClass* mine; My