Skip to content

Conversation

@cnjhb
Copy link
Contributor

@cnjhb cnjhb commented Sep 2, 2025

lvgl does not preserve the passed string. Therefore, it needs to be saved on the Lua side.

@XuNeo
Copy link
Owner

XuNeo commented Sep 15, 2025

LVGL will save the pointer in struct lv_image_t directly, thus it's useable when obj is alive.
Have you met some issues with it?

@cnjhb
Copy link
Contributor Author

cnjhb commented Sep 15, 2025

LVGL will save the pointer in struct lv_image_t directly, thus it's useable when obj is alive. Have you met some issues with it?

lv_image will store the entire string. But style will only store pointers. Probably because of lua's memory defragmentation, the stored pointers become invalid after a while.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants