ooh - and remove leak from callbacks not being freed! fixed!
authorCarsten Haitzler <raster@rasterman.com>
Wed, 21 Feb 2007 21:43:45 +0000 (21:43 +0000)
committerCarsten Haitzler <raster@rasterman.com>
Wed, 21 Feb 2007 21:43:45 +0000 (21:43 +0000)
SVN revision: 28426

legacy/evas/src/lib/canvas/evas_callbacks.c
legacy/evas/src/lib/canvas/evas_object_main.c
legacy/evas/src/lib/include/evas_private.h

index 5297aee..93502c3 100644 (file)
@@ -92,6 +92,21 @@ evas_object_event_callback_clear(Evas_Object *obj)
 }
 
 void
+evas_object_event_callback_all_del(Evas_Object *obj)
+{
+   Evas_Object_List *l;
+
+   if (!obj->callbacks) return;
+   for (l = obj->callbacks->callbacks; l; l = l->next)
+     {
+       Evas_Func_Node *fn;
+
+       fn = (Evas_Func_Node *)l;
+       fn->delete_me = 1;
+     }
+}
+
+void
 evas_object_event_callback_cleanup(Evas_Object *obj)
 {
    /* MEM OK */
index ab3f10c..de045b4 100644 (file)
@@ -56,6 +56,7 @@ evas_object_free(Evas_Object *obj, int clean_layer)
        obj->clip.changes = evas_list_remove(obj->clip.changes, r);
        free(r);
      }
+   evas_object_event_callback_all_del(obj);
    evas_object_event_callback_cleanup(obj);
    while (obj->data.elements)
      {
index f519834..d7283fd 100644 (file)
@@ -702,6 +702,7 @@ void evas_object_smart_unuse(Evas_Smart *s);
 void evas_object_smart_del(Evas_Object *obj);
 void evas_object_smart_cleanup(Evas_Object *obj);
 void *evas_mem_calloc(int size);
+void evas_object_event_callback_all_del(Evas_Object *obj);
 void evas_object_event_callback_cleanup(Evas_Object *obj);
 void evas_object_inform_call_show(Evas_Object *obj);
 void evas_object_inform_call_hide(Evas_Object *obj);