From: Carsten Haitzler Date: Wed, 21 Feb 2007 21:43:45 +0000 (+0000) Subject: ooh - and remove leak from callbacks not being freed! fixed! X-Git-Tag: submit/devel/efl/20131022.203902~18865 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9ae24eeaeb85eed6e23923db857c6df934d09eac;p=platform%2Fupstream%2Fefl.git ooh - and remove leak from callbacks not being freed! fixed! SVN revision: 28426 --- diff --git a/legacy/evas/src/lib/canvas/evas_callbacks.c b/legacy/evas/src/lib/canvas/evas_callbacks.c index 5297aee..93502c3 100644 --- a/legacy/evas/src/lib/canvas/evas_callbacks.c +++ b/legacy/evas/src/lib/canvas/evas_callbacks.c @@ -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 */ diff --git a/legacy/evas/src/lib/canvas/evas_object_main.c b/legacy/evas/src/lib/canvas/evas_object_main.c index ab3f10c..de045b4 100644 --- a/legacy/evas/src/lib/canvas/evas_object_main.c +++ b/legacy/evas/src/lib/canvas/evas_object_main.c @@ -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) { diff --git a/legacy/evas/src/lib/include/evas_private.h b/legacy/evas/src/lib/include/evas_private.h index f519834..d7283fd 100644 --- a/legacy/evas/src/lib/include/evas_private.h +++ b/legacy/evas/src/lib/include/evas_private.h @@ -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);