From b1954ce1e79ff3088f8d1766a5d37fca48731d54 Mon Sep 17 00:00:00 2001 From: Cedric BAIL Date: Tue, 22 May 2018 14:10:48 -0700 Subject: [PATCH] eo: move wref set to NULL to append after last event. Making wref disapear before the last event require additional work to use them during the FREE event. As I think we should introduce a wref that disapear after the invalidate state, it makes sense to move that to a later stage. Especially because their is no specific event related to them being set to NULL. --- src/lib/eo/eo_base_class.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/eo/eo_base_class.c b/src/lib/eo/eo_base_class.c index 2457df6c15..8687b9b923 100644 --- a/src/lib/eo/eo_base_class.c +++ b/src/lib/eo/eo_base_class.c @@ -2179,8 +2179,6 @@ composite_obj_back: if (pd->parent) goto err_parent; err_parent_back: - _wref_destruct(pd); - // this isn't 100% correct, as the object is still "slightly" alive at this // point (so efl_destructed_is() returns false), but triggering the // "destruct" event here is the simplest, safest solution. @@ -2191,6 +2189,8 @@ err_parent_back: _eo_generic_data_del_all(obj, pd); _eo_callback_remove_all(pd); + _wref_destruct(pd); + ext = pd->ext; // it is rather likely we dont have any extension section for most objects // so return immediately here to avoid pulling in more instructions to