/***********This is my code***********/ lv_obj_t *ParaPage,tPage1,tPage2; KnobInit(); while(1) { lv_tabview_clean_tab(tPage1); //Firstly, I'm clear about all the child objects of TPage1 NewAddKnob(); //Then, I'll rebuilt them in here. And if I comment out this function, memory usage does not increase. } void KnobInit() { static lv_style_t PageSty; ParaPage = lv_tabview_create(lv_scr_act(), NULL); tPage1 = lv_tabview_add_tab(ParaPage, "Page 1"); tPage2 = lv_tabview_add_tab(ParaPage, "Page 2"); lv_obj_set_size(ParaPage, 854, 135); lv_tabview_set_btns_pos(ParaPage, LV_TABVIEW_TAB_POS_NONE); // lv_tabview_set_tab_act(ParaPage, 1, LV_ANIM_OFF); lv_obj_align(ParaPage, NULL, LV_ALIGN_IN_BOTTOM_LEFT, 0, 0); lv_page_set_scrlbar_mode(tPage1, LV_SCRLBAR_MODE_OFF); lv_page_set_scrlbar_mode(tPage2, LV_SCRLBAR_MODE_OFF); lv_style_set_bg_color(&PageSty, LV_STATE_DEFAULT, DIY_COLOR_LBLACK); lv_obj_add_style(ParaPage, LV_TABVIEW_PART_BG, &PageSty); } //Here's the NewAddKnob declaration void NewAddKnob() { static lv_style_t MainSty, IndicSty, KnobSty; lv_style_init(&MainSty); lv_style_init(&IndicSty); lv_style_init(&KnobSty); lv_style_set_radius(&MainSty, LV_STATE_DEFAULT, 29); lv_style_set_pad_left(&MainSty, LV_STATE_DEFAULT, 0); lv_style_set_pad_right(&MainSty, LV_STATE_DEFAULT, 0); lv_style_set_pad_top(&MainSty, LV_STATE_DEFAULT, 0); lv_style_set_pad_bottom(&MainSty, LV_STATE_DEFAULT, 0); lv_style_set_bg_color(&MainSty, LV_STATE_DEFAULT, DIY_COLOR_LBLACK); //DIY_COLOR_LBLACK lv_style_set_line_color(&MainSty, LV_STATE_DEFAULT, LV_COLOR_BLACK); lv_style_set_line_width(&MainSty, LV_STATE_DEFAULT, 29); lv_style_set_border_width(&MainSty, LV_STATE_DEFAULT, 0); lv_style_set_radius(&IndicSty, LV_STATE_DEFAULT, 0); lv_style_set_line_color(&IndicSty, LV_STATE_DEFAULT, DIY_COLOR_GREEN); lv_style_set_line_width(&IndicSty, LV_STATE_DEFAULT, 4); lv_style_set_pad_left(&IndicSty, LV_STATE_DEFAULT, 2); lv_style_set_line_rounded(&IndicSty, LV_STATE_DEFAULT, false); lv_style_set_bg_color(&KnobSty, LV_STATE_DEFAULT, LV_COLOR_WHITE); lv_style_set_pad_left(&KnobSty, LV_STATE_DEFAULT, 100); lv_obj_t * arc = lv_arc_create(tPage1, NULL); lv_arc_set_bg_angles(arc, 0, 360); lv_arc_set_end_angle(arc, 200); lv_obj_set_size(arc, 58, 58); // lv_obj_align(arc, NULL, LV_ALIGN_CENTER, 0, 0); lv_obj_align(arc,ParaPage, LV_ALIGN_IN_LEFT_MID, CanvasPos[0]+68, 0); lv_obj_add_style(arc, LV_ARC_PART_BG, &MainSty); lv_obj_add_style(arc, LV_ARC_PART_INDIC, &IndicSty); lv_obj_add_style(arc, LV_ARC_PART_KNOB, &KnobSty); }