efl_ui_popup: do not leak the backwall part
authorMarcel Hollerbach <mail@marcel-hollerbach.de>
Mon, 9 Dec 2019 17:26:31 +0000 (18:26 +0100)
committerJongmin Lee <jm105.lee@samsung.com>
Wed, 11 Dec 2019 21:23:45 +0000 (06:23 +0900)
freeing it in the destructor is not enough. This has to be done at the
invalidator stage, otherwise bindings might have a blocking element on
the screen for the time the object is not gargabe collected.

Reviewed-by: Jaehyun Cho <jae_hyun.cho@samsung.com>
Differential Revision: https://phab.enlightenment.org/D10837

src/lib/elementary/efl_ui_popup.c
src/lib/elementary/efl_ui_popup.eo

index 818ecfa..bf95304 100644 (file)
@@ -623,9 +623,15 @@ _efl_ui_popup_efl_object_constructor(Eo *obj, Efl_Ui_Popup_Data *pd)
 }
 
 EOLIAN static void
-_efl_ui_popup_efl_object_destructor(Eo *obj, Efl_Ui_Popup_Data *pd)
+_efl_ui_popup_efl_object_invalidate(Eo *obj, Efl_Ui_Popup_Data *pd)
 {
    ELM_SAFE_DEL(pd->backwall);
+   efl_invalidate(efl_super(obj, MY_CLASS));
+}
+
+EOLIAN static void
+_efl_ui_popup_efl_object_destructor(Eo *obj, Efl_Ui_Popup_Data *pd)
+{
    _anchor_detach(obj, pd);
 
    efl_event_callback_del(pd->win_parent, EFL_GFX_ENTITY_EVENT_SIZE_CHANGED, _parent_geom_cb,
index 0222ad8..a4345b4 100644 (file)
@@ -125,6 +125,7 @@ class Efl.Ui.Popup extends Efl.Ui.Layout_Base implements Efl.Content, Efl.Ui.Foc
    implements {
       Efl.Object.constructor;
       Efl.Object.destructor;
+      Efl.Object.invalidate;
       Efl.Canvas.Group.group_calculate;
       Efl.Gfx.Entity.position { set; }
       Efl.Gfx.Entity.size { set;}