You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have encountered a memory leak when calling lvgl_port_remove_disp after lvgl_port_add_disp. The issue seems to originate from the draw_ctx not being properly deinitialized and freed.
Call lvgl_port_add_disp to add a display.
Call lvgl_port_remove_disp to remove the display.
Observe the memory leak related to draw_ctx.
Proposed Fix:
To resolve this issue, I suggest modifying the lvgl_port_remove_disp function to include the following code:
if (disp_drv->draw_ctx) {
disp_drv->draw_ctx_deinit(disp_drv, disp_drv->draw_ctx);
lv_mem_free(disp_drv->draw_ctx);
disp_drv->draw_ctx=NULL;
}
Sketch
lvgl_port_add_disp() then lvgl_port_remove_disp()
Other Steps to Reproduce
No response
I have checked existing issues, README.md and ESP32 Forum
I confirm I have checked existing issues, online documentation and Troubleshooting guide.
The text was updated successfully, but these errors were encountered:
github-actionsbot
changed the title
Memory Leak in lvgl_port_remove_disp Related to draw_ctx
Memory Leak in lvgl_port_remove_disp Related to draw_ctx (BSP-604)
Dec 22, 2024
Board
Custom board
Hardware Description
Custom board
IDE Name
VSCode
Operating System
Windows11
Description
Environment:
LVGL Version: 8.4.0
esp_lvgl_port Version: 2.4.3
Description:
I have encountered a memory leak when calling lvgl_port_remove_disp after lvgl_port_add_disp. The issue seems to originate from the draw_ctx not being properly deinitialized and freed.
Proposed Fix:
To resolve this issue, I suggest modifying the lvgl_port_remove_disp function to include the following code:
Sketch
lvgl_port_add_disp() then lvgl_port_remove_disp()
Other Steps to Reproduce
No response
I have checked existing issues, README.md and ESP32 Forum
The text was updated successfully, but these errors were encountered: