Fix a memory leak in CmaRootObject.
Assign a thread name for easy debugging.
This commit is contained in:
@@ -29,10 +29,14 @@ void BaseWorker::onFinished()
|
||||
{
|
||||
}
|
||||
|
||||
void BaseWorker::start()
|
||||
void BaseWorker::start(const char *thread_name)
|
||||
{
|
||||
thread = new QThread();
|
||||
|
||||
if(thread_name) {
|
||||
thread->setObjectName(thread_name);
|
||||
}
|
||||
|
||||
// Move this service to a new thread
|
||||
this->moveToThread(thread);
|
||||
|
||||
|
Reference in New Issue
Block a user