Skip to content

Commit 0109ab3

Browse files
XuNeoxiaoxiang781216
authored andcommitted
lvgldemo: should use nuttx_deinit to free all resources
Memory leak can be detected when simply change the while(1) loop to exit. The lv_nuttx_deinit will free resources including display, input etc. Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
1 parent 1506c6f commit 0109ab3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/lvgldemo/lvgldemo.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ int main(int argc, FAR char *argv[])
162162
#endif
163163

164164
demo_end:
165-
lv_disp_remove(result.disp);
165+
lv_nuttx_deinit(&result);
166166
lv_deinit();
167167

168168
return 0;

0 commit comments

Comments
 (0)