From: http://doc.qt.io/qt-5/qthread.html#details
From Qt 4.8 onwards, it is possible to deallocate objects that live in a thread that has just ended, by connecting the finished() signal to QObject::deleteLater().
Does this mean if I connect finished() signal to QObject::deleteLater() I won't have to worry about memory leaks in the worker thread?
What objects of worker thread class is it going to deallocate on its own?
connect(workerThread, &WorkerThread::finished, workerThread, &QObject::deleteLater);
From : doc.qt.io/qt-5/qthread.html#details
They have shown workerthread's object connected to deleteLater slot. Now does this mean that all objects which I allocate memory to inside the worker class will get automatically deleted?