-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Milestone
Description
There is a not null probability that a taskmanager can leave memory leaks because can does not destroy task added. I managed to make it happens almost systematically on an embedded device.
The problem is that start do this
_threadPool.start(*pTask, pTask->name());
ScopedLockT lock(_mutex);
_taskList.push_back(pAutoTask);
than the taskfinished notify the observer and delete the task from list
We can hit the problem if we start the task, the thread run immediately and we end up in taskfinished before the
_taskList.push_back(pAutoTask);
I know it's some kind of anomaly situation, but, believe me, I get this a lot of time (almost systematically) in a day on a particular embedded environment (linux), and I used that code for years without problem
Reactions are currently unavailable