discomfitor pushed a commit to branch master.

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

commit 42018930487c37563745e86c75a1e7816a81fd41
Author: Marcel Hollerbach <[email protected]>
Date:   Tue Jun 19 13:36:04 2018 -0400

    eo: make the debug build print leaked errors
    
    Summary: Depends on D6328
    
    Reviewers: devilhorns, zmike
    
    Reviewed By: zmike
    
    Subscribers: cedric, #committers, zmike
    
    Tags: #efl
    
    Differential Revision: https://phab.enlightenment.org/D6329
---
 src/lib/eo/eo.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c
index 6dbd66be64..680dc1f016 100644
--- a/src/lib/eo/eo.c
+++ b/src/lib/eo/eo.c
@@ -2330,6 +2330,22 @@ efl_object_shutdown(void)
    if (--_efl_object_init_count > 0)
      return EINA_TRUE;
 
+#ifdef EO_DEBUG
+   {
+      Efl_Object *obj;
+      Eina_Iterator *objects;
+      objects = eo_objects_iterator_new();
+      printf("Objects leaked by EO:\n");
+      printf("class@pointer - user-refcount internal-refcount\n");
+      EINA_ITERATOR_FOREACH(objects, obj)
+        {
+           printf("%s@%p - %d %d \n", efl_class_name_get(obj), obj, 
efl_ref_count(obj), ___efl_ref2_count(obj));
+        }
+      eina_iterator_free(objects);
+   }
+#endif
+
+
    eina_log_timing(_eo_log_dom,
                    EINA_LOG_STATE_START,
                    EINA_LOG_STATE_SHUTDOWN);

-- 


Reply via email to