C++ (Qt)class MyThread : public QThread {........} void runThread(void) { MyThread* thr = new MyThread(); thr->start();}
C++ (Qt)void someClass::someSlot(){delete qobject_cast<QThread*>(sender());}
C++ (Qt)class MyThread : public QThread {........} void runThread(void) { MyThread* thr = new MyThread(); connect(thr , SIGNAL(finished()), thr , SLOT(deleteLater())); thr->start();}