gadget: explicitly remove mouse-down callback on shutdown
evas_object_del would clean up the callback as a side effect, but matching every add with an explicit del avoids relying on that ordering and keeps the lifetime obvious to readers. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
ad3d752b12
commit
c115148f4a
1 changed files with 3 additions and 0 deletions
|
|
@ -201,6 +201,9 @@ _gc_shutdown(E_Gadcon_Client *gcc)
|
|||
Instance *inst = gcc->data;
|
||||
if (!inst) return;
|
||||
_instances = eina_list_remove(_instances, inst);
|
||||
if (inst->o_base)
|
||||
evas_object_event_callback_del_full(inst->o_base, EVAS_CALLBACK_MOUSE_DOWN,
|
||||
_on_mouse_down, inst);
|
||||
if (inst->o_icon) evas_object_del(inst->o_icon);
|
||||
if (inst->o_base) evas_object_del(inst->o_base);
|
||||
E_FREE(inst);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue