Skip to content

Commit

Permalink
fix: 更改窗口关闭时,释放资源的顺序,彻底修复部分平台上,关闭窗口偶发的崩溃问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Augtons committed Mar 31, 2024
1 parent e152387 commit 08c8c36
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,12 @@ lvglsim::Window::~Window()
lv_disp_remove(main_disp);
main_disp = nullptr;
}
main_texture = std::nullopt;
main_renderer = std::nullopt;
main_window = std::nullopt;
delete[] display_buffer;
delete[] lvgl_buffer_1;
delete[] lvgl_buffer_2;
main_window = std::nullopt;
main_renderer = std::nullopt;
main_texture = std::nullopt;
}

void lvglsim::Window::flushToWindow(lv_disp_drv_t *drv, const lv_area_t *area, lv_color_t *color_p) {
Expand Down

0 comments on commit 08c8c36

Please sign in to comment.