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:
co-authored by
Peter Feerick
Claude Opus 5.5
parent
6a1cf34079
commit
598255e1d1
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user