请教关于线程的问题
void FortuneServer::incomingConnection(qintptr socketDescriptor)
{
QString fortune = fortunes.at(qrand() % fortunes.size());
FortuneThread *thread = new FortuneThread(socketDescriptor, fortune, this);
connect(thread, SIGNAL(finished()), thread, SLOT(deleteLater()));
thread->start();
}
如上代码中,线程指针thread,在new FortuneThread之后,是不是不需要用delete thread来删除?它运行完后,会自动删除掉或者回收?