chore(color): refactor window close / delete logic (#7804)

Co-authored-by: Peter Feerick <5500713+pfeerick@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
philmoz
2026-09-25 13:44:46 +10:00
committed by GitHub
co-authored by Peter Feerick Claude Opus 5.5
parent 6a1cf34079
commit 598255e1d1
103 changed files with 539 additions and 390 deletions
+5 -6
View File
@@ -263,13 +263,12 @@ LuaWidget::LuaWidget(const WidgetFactory* factory, Window* parent,
lv_obj_add_event_cb(lvobj, LuaWidget::redraw_cb, LV_EVENT_DRAW_MAIN,
nullptr);
}
}
LuaWidget::~LuaWidget()
{
luaL_unref(lsWidgets, LUA_REGISTRYINDEX, zoneRectDataRef);
if (errorMessage)
free(errorMessage);
onClosing([=]() {
luaL_unref(lsWidgets, LUA_REGISTRYINDEX, zoneRectDataRef);
if (errorMessage)
free(errorMessage);
});
}
void LuaWidget::onClicked()