From a6c184502eabfdc216f8e6b78ee33fac51b4f598 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Thu, 20 Aug 2015 19:16:00 +0900 Subject: [PATCH] eo - use ren not xref for children to not waste memory optimization xrefs keep lists of objects references. children are already in a list. why keep both? lots of extra memory used for no value when debug is on (pretty much most of the time). --- src/lib/eo/eo_base_class.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/lib/eo/eo_base_class.c b/src/lib/eo/eo_base_class.c index 9f8252b6bd..ff62cdae34 100644 --- a/src/lib/eo/eo_base_class.c +++ b/src/lib/eo/eo_base_class.c @@ -124,8 +124,7 @@ _eo_base_parent_set(Eo *obj, Eo_Base_Data *pd, Eo *parent_id) ERR("CONTACT DEVS!!! SHOULD NEVER HAPPEN!!! Old parent %p for object %p is not a valid Eo object.", pd->parent, obj); } - - eo_xunref(obj, pd->parent); + eo_unref(obj); } /* Set new parent */ @@ -137,10 +136,9 @@ _eo_base_parent_set(Eo *obj, Eo_Base_Data *pd, Eo *parent_id) if (EINA_LIKELY(parent_pd != NULL)) { pd->parent = parent_id; - parent_pd->children = eina_list_append(parent_pd->children, - obj); + parent_pd->children = eina_list_append(parent_pd->children, obj); pd->parent_list = eina_list_last(parent_pd->children); - eo_xref(obj, pd->parent); + eo_ref(obj); } else {