summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2015-08-20 19:16:00 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2015-08-20 19:41:47 +0900
commita6c184502eabfdc216f8e6b78ee33fac51b4f598 (patch)
treed841c67da8c4c0f8bce6b6e43524b51b70c7bf87
parentea676ede42d3f4fa0bfaafdd2fe6f1ab65ecb263 (diff)
downloadefl-a6c184502eabfdc216f8e6b78ee33fac51b4f598.tar.gz
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).
-rw-r--r--src/lib/eo/eo_base_class.c8
1 files 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
{