Skip to content

Conversation

@schlimmchen
Copy link

adjusts an example to disable a single task before it runs out of iterations. the task disables itself. without the fix in TaskScheduler.h, one can observe a memory leak, as the task which disabled itself is not deleted.

the TaskScheduler is adjusted to check the self-destruct request flag of disabled tasks and to delete such tasks.

output of original example

Free mem=354580 No of tasks=0

        No of tasks=0
        Free mem=354580

output of modified example without fix:

Free mem=354572 No of tasks=0

        No of tasks=0
        Free mem=354488

output of modified example with fix:

Free mem=354572 No of tasks=0

        No of tasks=0
        Free mem=354572

adjusts an example to disable a single task before it runs out of
iterations. the task disables itself. without the fix in
TaskScheduler.h, one can observe a memory leak, as the task which
disabled itself is not deleted.

the TaskScheduler is adjusted to check the self-destruct request flag
of disabled tasks and to delete such tasks.
@schlimmchen
Copy link
Author

notice that the example which is modified in this PR needs #180 to compile.

@arkhipenko
Copy link
Owner

Pushed into testing branch as v3.8.4

@schlimmchen schlimmchen deleted the self-destruct-manually-disabled-tasks branch January 13, 2024 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants