From ada320f6b82bdc5740af3922ff6c5c5b33ec25cd Mon Sep 17 00:00:00 2001 From: Neo Xu Date: Sat, 26 Oct 2024 12:56:57 +0800 Subject: [PATCH] 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 --- examples/lvgldemo/lvgldemo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/lvgldemo/lvgldemo.c b/examples/lvgldemo/lvgldemo.c index 15fb906b0f..52d48ba7d3 100644 --- a/examples/lvgldemo/lvgldemo.c +++ b/examples/lvgldemo/lvgldemo.c @@ -162,7 +162,7 @@ int main(int argc, FAR char *argv[]) #endif demo_end: - lv_disp_remove(result.disp); + lv_nuttx_deinit(&result); lv_deinit(); return 0;