raster pushed a commit to branch master.

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

commit a6c184502eabfdc216f8e6b78ee33fac51b4f598
Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com>
Date:   Thu Aug 20 19:16:00 2015 +0900

    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 9f8252b..ff62cda 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
           {

-- 


Reply via email to