1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-14 06:42:58 +08:00

fix(cache): fix built-in cache memory leak (#4927)

Signed-off-by: Xu Xingliang <xuxingliang@xiaomi.com>
This commit is contained in:
Neo Xu 2023-12-05 16:56:22 +08:00 committed by GitHub
parent 668fd1cffa
commit a6ec0a1101
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -69,6 +69,14 @@ void _lv_cache_builtin_init(void)
void _lv_cache_builtin_deinit(void)
{
lv_cache_entry_t * entry = _lv_ll_get_head(&dsc.entry_ll);
lv_cache_entry_t * next;
while(entry) {
next = _lv_ll_get_next(&dsc.entry_ll, entry);
invalidate_cb(entry);
entry = next;
}
_lv_ll_clear(&dsc.entry_ll);
}