jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=c372e5e6c77bdd28ac1fd3b922a60d263f7d94ef

commit c372e5e6c77bdd28ac1fd3b922a60d263f7d94ef
Author: Jean-Philippe Andre <[email protected]>
Date:   Mon Nov 27 22:24:01 2017 +0900

    win: Allow unref until deletion
    
    This is for bindings. I wish I could actually distinguish the use case
    more (between efl_add() from C and instantiation from C++).
---
 src/lib/elementary/efl_ui_win.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index 3a3d8230d5..3ebbdb116c 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -5406,6 +5406,10 @@ _efl_ui_win_efl_object_constructor(Eo *obj, 
Efl_Ui_Win_Data *pd)
    pd->provider = efl_add(EFL_UI_FOCUS_PARENT_PROVIDER_STANDARD_CLASS, obj);
    pd->profile.available = eina_array_new(4);
 
+   // For bindings: if no parent, allow simple unref
+   if (!efl_parent_get(obj))
+     efl_allow_parent_unref_set(obj, EINA_TRUE);
+
    efl_composite_attach(obj, pd->manager);
    _efl_ui_focus_manager_redirect_events_add(pd->manager, obj);
 

-- 


Reply via email to