Keep creating and destroy object will appear Out of memory

Hello, everyone, I got a problem. When I switch pages back and forth, the phenomenon of Out of memory appears. The LV_MEM_SIZE is (32U * 1024U). Can anyone help me? I really appreciate it.

I use lv_obj_clean(lv_scr_act()) to delete objects. and I have the mere one screen,

I also encountered this situation

Did you solve it? In my project, I have observed the memory array, I repeated to call lv_style_init() and lv_group_create(), It will increase the memrory usage.In other words.after delete one page, then create the page, both functions will increase the memory usage. So the sytle and group maybe be called one time.

Maybe you can pay attention to these two functions

I haven’t solved it. I use lv_tabview_set_tab_act(tab_id) to switch the tab_id tab, then use lv_tabview_clean_tab() to clean all the objs in this tab, and then create new objs, add style for them.When I switch pages back and forth, the phenomenon of Out of memory appears .I just init the style once at the beginning.

lv_style_init only needs to be called once; after that you can just call lv_style_reset. See this post for more details.

lv_group_create has the same conceptual idea; if you’re tearing down the objects on a screen, you also need to delete the group, otherwise it stays in memory forever.