память???
нет
подключи QThread::finished к deleteLater треда и объекта-воркера
QThread* thread = new QThread; UrObjClass* worker = new UrObjClass(); worker->moveToThread(thread); connect(thread, SIGNAL(started()), worker, SLOT(process())); connect(worker, SIGNAL(finished()), thread, SLOT(quit())); connect(worker, SIGNAL(finished()), worker, SLOT(deleteLater())); connect(thread, SIGNAL(finished()), thread, SLOT(deleteLater())); connect(thread, SIGNAL(finished()), this, SLOT(ur_continue_slot())); thread->start();
Обсуждают сегодня