Skip to content

fix(style): for imgsrc type#84

Open
cnjhb wants to merge 3 commits into
XuNeo:masterfrom
cnjhb:style
Open

fix(style): for imgsrc type#84
cnjhb wants to merge 3 commits into
XuNeo:masterfrom
cnjhb:style

Conversation

@cnjhb

@cnjhb cnjhb commented Sep 2, 2025

Copy link
Copy Markdown
Contributor

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

@XuNeo

XuNeo commented Sep 15, 2025

Copy link
Copy Markdown
Owner

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

cnjhb commented Sep 15, 2025

Copy link
Copy Markdown
Contributor Author

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