forked from enlightenment/efl
elm: Move calls to efl_destructor(efl_super()) to the end
When destroying any object, its parent class destructor should be called after the subclass destructor has been called. Only some extremely limited work may be done after the super call. This commit makes sure that all efl_destructor() overrides in elementary are doing operations in the right order. Also, remove a return void.
This commit is contained in:
parent
dd883a7064
commit
d4b2eb1e7f
|
@ -246,7 +246,7 @@ _efl_ui_focus_manager_sub_efl_object_destructor(Eo *obj, Efl_Ui_Focus_Manager_Su
|
|||
{
|
||||
_border_unregister(obj, pd);
|
||||
|
||||
return efl_destructor(efl_super(obj, MY_CLASS));
|
||||
efl_destructor(efl_super(obj, MY_CLASS));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -287,7 +287,6 @@ _elm_flipselector_item_efl_object_destructor(Eo *eo_item, Elm_Flipselector_Item_
|
|||
eina_stringshare_del(item->label);
|
||||
sd->items = eina_list_remove(sd->items, eo_item);
|
||||
efl_destructor(efl_super(eo_item, ELM_FLIPSELECTOR_ITEM_CLASS));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -302,7 +301,6 @@ _elm_flipselector_item_efl_object_destructor(Eo *eo_item, Elm_Flipselector_Item_
|
|||
|
||||
eina_stringshare_del(item->label);
|
||||
sd->items = eina_list_remove(sd->items, eo_item);
|
||||
efl_destructor(efl_super(eo_item, ELM_FLIPSELECTOR_ITEM_CLASS));
|
||||
|
||||
_sentinel_eval(sd);
|
||||
|
||||
|
@ -311,6 +309,8 @@ _elm_flipselector_item_efl_object_destructor(Eo *eo_item, Elm_Flipselector_Item_
|
|||
if (sd->view_update) ecore_job_del(sd->view_update);
|
||||
sd->view_update = ecore_job_add(_view_update, WIDGET(item));
|
||||
}
|
||||
|
||||
efl_destructor(efl_super(eo_item, ELM_FLIPSELECTOR_ITEM_CLASS));
|
||||
}
|
||||
|
||||
EOLIAN static Eo *
|
||||
|
|
|
@ -6214,15 +6214,13 @@ _elm_widget_efl_object_finalize(Eo *obj, Elm_Widget_Smart_Data *pd)
|
|||
|
||||
|
||||
EOLIAN static void
|
||||
_elm_widget_efl_object_destructor(Eo *obj, Elm_Widget_Smart_Data *sd EINA_UNUSED)
|
||||
_elm_widget_efl_object_destructor(Eo *obj, Elm_Widget_Smart_Data *sd)
|
||||
{
|
||||
sd->on_destroy = EINA_TRUE;
|
||||
efl_destructor(efl_super(obj, ELM_WIDGET_CLASS));
|
||||
sd->on_destroy = EINA_FALSE;
|
||||
|
||||
if (sd->manager.provider)
|
||||
efl_event_callback_del(sd->manager.provider, EFL_UI_FOCUS_USER_EVENT_MANAGER_CHANGED, _manager_changed_cb, obj);
|
||||
sd->manager.provider = NULL;
|
||||
{
|
||||
efl_event_callback_del(sd->manager.provider, EFL_UI_FOCUS_USER_EVENT_MANAGER_CHANGED, _manager_changed_cb, obj);
|
||||
sd->manager.provider = NULL;
|
||||
}
|
||||
|
||||
elm_interface_atspi_accessible_removed(obj);
|
||||
if (sd->logical.parent)
|
||||
|
@ -6230,6 +6228,10 @@ _elm_widget_efl_object_destructor(Eo *obj, Elm_Widget_Smart_Data *sd EINA_UNUSED
|
|||
efl_weak_unref(&sd->logical.parent);
|
||||
sd->logical.parent = NULL;
|
||||
}
|
||||
|
||||
sd->on_destroy = EINA_TRUE;
|
||||
efl_destructor(efl_super(obj, ELM_WIDGET_CLASS));
|
||||
sd->on_destroy = EINA_FALSE;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
|
|
Loading…
Reference in New Issue