In the case of inheriting from the Task class, the destructor should be virtual to avoid undefined behavior. This came to light from a GCC warning:
src/tasks/base_task.cpp:34:12: warning: deleting object of abstract class type 'Task' which has non-virtual destructor will cause undefined behaviour [-Wdelete-non-virtual-dtor]
Would you like me to create a pull request, since the change only requires adding the virtual keyword to the TaskSchedulerDeclarations.h file on line 155?
In the case of inheriting from the
Task
class, the destructor should be virtual to avoid undefined behavior. This came to light from a GCC warning:Would you like me to create a pull request, since the change only requires adding the
virtual
keyword to theTaskSchedulerDeclarations.h
file on line 155?