In the code generated in NXP's GUI-Guider, switching screen will cause memory leaks

Description

switching screen will cause memory leaks,Memory usage increases every time you switch screens

What MCU/Processor/Board and compiler are you using?

stm32f746g-disco,lvgl v8.3.3

What do you want to achieve?

Switching screen will not cause memory leaks

What have you tried so far?

Add lv_obj_clean(lv_scr_act()); in event_handler,but didn’t solve the problem

Code to reproduce

static void screen_1_btn_6_event_handler(lv_event_t *e)
{
lv_event_code_t code = lv_event_get_code(e);
switch (code)
{
case LV_EVENT_CLICKED:
{
lv_obj_clean(lv_scr_act());//This is what I added
if (!lv_obj_is_valid(guider_ui.screen_3))
setup_scr_screen_3(&guider_ui);
lv_disp_t * d = lv_obj_get_disp(lv_scr_act());
// if (d->prev_scr == NULL && d->scr_to_load == NULL)//If this paragraph is not commented, the screen will be blank after triggering the button
lv_scr_load_anim(guider_ui.screen_3, LV_SCR_LOAD_ANIM_NONE, 1000, 1000, true);

}
	break;
default:
	break;
}

}

static lv_style_t style_screen_1_main_main_default;
if (style_screen_1_main_main_default.prop_cnt > 1)
	lv_style_reset(&style_screen_1_main_main_default);
else
	lv_style_init(&style_screen_1_main_main_default);

used an if() statement to make the second display use lv_style_reset instead of lv_style_init, but I suspect this helps avoid memory leaks

Did you solve it?

I have a memory leak with GUI-Guider generated code.
On screen changes, memory usage increases and around 40%, the app freezes.

I got this problem as well; i force load another screen and add delay and animation time to solve it; But i dont know why!!!
//================================
The Gui_guider product:
Btn_event()
{
case LV_EVENT_CLICKED:
lv_disp_t * d = lv_obj_get_disp(lv_scr_act());
if (d->prev_scr == NULL && d->scr_to_load == NULL) //d->scr_to_load != NULL always set up ---- if cut down this the memory leak will happen! — I dont know why?
{
if (guider_ui.screen_2_del == true)
setup_scr_screen_2(&guider_ui);
lv_scr_load_anim(guider_ui.screen_2,LV_SCR_LOAD_ANIM_OVER_TOP, 0, 0, true);
}
}
//=============================================
I add this code
btn_event()
{
case LV_EVENT_CLICKED:
{
printf(“Screen1 Menu Button Click\r\n”);
if (!lv_obj_is_valid(guider_ui.screen_2))
{
printf(“screen_2 unvalid → Init the screen_2\r\n”);
setup_scr_screen_2(&guider_ui);
}
lv_scr_load_anim(guider_ui.screen_2,LV_SCR_LOAD_ANIM_OVER_TOP, 10, 10,true);
}