fix issue #7 - invoke view_dispatcher_remove_view

This commit is contained in:
Derek Jamison 2023-04-18 22:06:36 -04:00
parent bfd76eac24
commit f7f6e2a17e
2 changed files with 14 additions and 5 deletions

View File

@ -90,11 +90,16 @@ App* app_alloc() {
void app_free(void* context) {
App* app = context;
furi_assert(app);
view_dispatcher_remove_view(app->view_dispatcher, WiegandTextInputView);
text_input_free(app->text_input);
view_dispatcher_remove_view(app->view_dispatcher, WiegandWidgetView);
widget_free(app->widget);
view_dispatcher_remove_view(app->view_dispatcher, WiegandSubmenuView);
submenu_free(app->submenu);
scene_manager_free(app->scene_manager);
view_dispatcher_free(app->view_dispatcher);
submenu_free(app->submenu);
widget_free(app->widget);
text_input_free(app->text_input);
furi_timer_free(app->timer);
furi_record_close(RECORD_DIALOGS);
free(app);

View File

@ -153,10 +153,14 @@ void hid_free(Hid* app) {
notification_internal_message(app->notifications, &sequence_reset_blue);
// Free views
view_dispatcher_remove_view(app->view_dispatcher, HidViewSubmenu);
submenu_free(app->submenu);
view_dispatcher_remove_view(app->view_dispatcher, BtHidViewClicker);
hid_cc_free(app->hid_cc);
view_dispatcher_remove_view(app->view_dispatcher, BtHidViewCredits);
widget_free(app->widget_credits);
view_dispatcher_remove_view(app->view_dispatcher, BtHidViewInstructions);
widget_free(app->widget_instructions);
view_dispatcher_remove_view(app->view_dispatcher, HidViewSubmenu);
submenu_free(app->submenu);
view_dispatcher_free(app->view_dispatcher);
// Close records