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)
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)
124 ERR("CONTACT DEVS!!! SHOULD NEVER HAPPEN!!! Old parent %p for object %p is not a valid Eo object.", 124 ERR("CONTACT DEVS!!! SHOULD NEVER HAPPEN!!! Old parent %p for object %p is not a valid Eo object.",
125 pd->parent, obj); 125 pd->parent, obj);
126 } 126 }
127 127 eo_unref(obj);
128 eo_xunref(obj, pd->parent);
129 } 128 }
130 129
131 /* Set new parent */ 130 /* Set new parent */
@@ -137,10 +136,9 @@ _eo_base_parent_set(Eo *obj, Eo_Base_Data *pd, Eo *parent_id)
137 if (EINA_LIKELY(parent_pd != NULL)) 136 if (EINA_LIKELY(parent_pd != NULL))
138 { 137 {
139 pd->parent = parent_id; 138 pd->parent = parent_id;
140 parent_pd->children = eina_list_append(parent_pd->children, 139 parent_pd->children = eina_list_append(parent_pd->children, obj);
141 obj);
142 pd->parent_list = eina_list_last(parent_pd->children); 140 pd->parent_list = eina_list_last(parent_pd->children);
143 eo_xref(obj, pd->parent); 141 eo_ref(obj);
144 } 142 }
145 else 143 else
146 { 144 {