forked from enlightenment/efl
efl_ui_scroller: free pan object correctly
we need to free the object in the invalidate, not in the destructor. Otherwise we might leak objects in bindings. Reviewed-by: Jaehyun Cho <jae_hyun.cho@samsung.com> Reviewed-by: Cedric BAIL <cedric.bail@free.fr> Differential Revision: https://phab.enlightenment.org/D10840
This commit is contained in:
parent
3a712e2497
commit
e81dc6a02b
|
@ -278,15 +278,22 @@ _efl_ui_scroller_efl_object_finalize(Eo *obj,
|
||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EOLIAN static void
|
||||||
|
_efl_ui_scroller_efl_object_invalidate(Eo *obj, Efl_Ui_Scroller_Data *pd)
|
||||||
|
{
|
||||||
|
efl_event_callback_del(pd->pan_obj, EFL_GFX_ENTITY_EVENT_SIZE_CHANGED,
|
||||||
|
_efl_ui_scroller_pan_resized_cb, obj);
|
||||||
|
efl_del(pd->pan_obj);
|
||||||
|
pd->pan_obj = NULL;
|
||||||
|
|
||||||
|
efl_invalidate(efl_super(obj, MY_CLASS));
|
||||||
|
}
|
||||||
|
|
||||||
EOLIAN static void
|
EOLIAN static void
|
||||||
_efl_ui_scroller_efl_object_destructor(Eo *obj,
|
_efl_ui_scroller_efl_object_destructor(Eo *obj,
|
||||||
Efl_Ui_Scroller_Data *sd)
|
Efl_Ui_Scroller_Data *sd)
|
||||||
{
|
{
|
||||||
efl_ui_scroll_connector_unbind(obj);
|
efl_ui_scroll_connector_unbind(obj);
|
||||||
efl_event_callback_del(sd->pan_obj, EFL_GFX_ENTITY_EVENT_SIZE_CHANGED,
|
|
||||||
_efl_ui_scroller_pan_resized_cb, obj);
|
|
||||||
efl_del(sd->pan_obj);
|
|
||||||
sd->pan_obj = NULL;
|
|
||||||
sd->smanager = NULL;
|
sd->smanager = NULL;
|
||||||
|
|
||||||
efl_destructor(efl_super(obj, MY_CLASS));
|
efl_destructor(efl_super(obj, MY_CLASS));
|
||||||
|
|
|
@ -24,6 +24,7 @@ class Efl.Ui.Scroller extends Efl.Ui.Layout_Base implements
|
||||||
Efl.Object.constructor;
|
Efl.Object.constructor;
|
||||||
Efl.Object.finalize;
|
Efl.Object.finalize;
|
||||||
Efl.Object.destructor;
|
Efl.Object.destructor;
|
||||||
|
Efl.Object.invalidate;
|
||||||
Efl.Content.content { get; set; }
|
Efl.Content.content { get; set; }
|
||||||
Efl.Content.content_unset;
|
Efl.Content.content_unset;
|
||||||
Efl.Canvas.Group.group_calculate;
|
Efl.Canvas.Group.group_calculate;
|
||||||
|
|
Loading…
Reference in New Issue