delete background task before upgrade

This commit is contained in:
Terrence
2025-01-13 06:49:01 +08:00
parent 03020d8e2e
commit b00bfaf181
4 changed files with 26 additions and 10 deletions

View File

@@ -23,6 +23,9 @@ BackgroundTask::~BackgroundTask() {
if (background_task_handle_ != nullptr) {
vTaskDelete(background_task_handle_);
}
if (task_stack_ != nullptr) {
heap_caps_free(task_stack_);
}
}
void BackgroundTask::Schedule(std::function<void()> callback) {