1
0
Fork 0

potentially fix leak

This commit is contained in:
jsteemann 2016-09-15 09:24:37 +02:00
parent 542f4bb955
commit 135edf1239
1 changed files with 5 additions and 2 deletions

View File

@ -171,8 +171,11 @@ void SchedulerThread::destroyTask(Task* task) {
////////////////////////////////////////////////////////////////////////////////
void SchedulerThread::signalTask(std::unique_ptr<TaskData>& data) {
_taskData.push(data.release());
_scheduler->wakeupLoop(_loop);
bool result = _taskData.push(data.get());
if (result) {
data.release();
_scheduler->wakeupLoop(_loop);
}
}
void SchedulerThread::run() {