From: tsauerbeck Date: Mon, 12 Jan 2004 19:21:25 +0000 (+0000) Subject: more memory management cleanups. fixed some warnings. X-Git-Tag: submit/efl/20131015.063327~22202 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7ebc004b74ad3c10960c7de7596c32b19145755a;p=platform%2Fupstream%2Fefl.git more memory management cleanups. fixed some warnings. SVN revision: 8357 --- diff --git a/legacy/edje/src/lib/edje_main.c b/legacy/edje/src/lib/edje_main.c index e0b839c657..8e39527696 100644 --- a/legacy/edje/src/lib/edje_main.c +++ b/legacy/edje/src/lib/edje_main.c @@ -18,6 +18,8 @@ edje_shutdown(void) if (!initted) return; _edje_edd_free(); + _edje_color_class_members_free(); + _edje_text_class_members_free(); initted = 0; } diff --git a/legacy/edje/src/lib/edje_private.h b/legacy/edje/src/lib/edje_private.h index 9c2968f250..4a1ca42a62 100644 --- a/legacy/edje/src/lib/edje_private.h +++ b/legacy/edje/src/lib/edje_private.h @@ -590,9 +590,13 @@ Edje_Color_Class *_edje_color_class_find(Edje *ed, char *color_class); void _edje_color_class_member_add(Edje *ed, char *color_class); void _edje_color_class_member_del(Edje *ed, char *color_class); void _edje_color_class_on_del(Edje *ed, Edje_Part *ep); +void _edje_color_class_members_free(void); + Edje_Text_Class *_edje_text_class_find(Edje *ed, char *text_class); void _edje_text_class_member_add(Edje *ed, char *text_class); void _edje_text_class_member_del(Edje *ed, char *text_class); +void _edje_text_class_members_free(void); + Edje *_edje_fetch(Evas_Object *obj); int _edje_glob_match(char *str, char *glob); int _edje_freeze(Edje *ed); diff --git a/legacy/edje/src/lib/edje_util.c b/legacy/edje/src/lib/edje_util.c index 1276898da1..7b7907aeed 100644 --- a/legacy/edje/src/lib/edje_util.c +++ b/legacy/edje/src/lib/edje_util.c @@ -1015,7 +1015,7 @@ _edje_color_class_find(Edje *ed, char *color_class) { Evas_List *l; - if ((!ed) || (!color_class)) return; + if ((!ed) || (!color_class)) return NULL; for (l = ed->color_classes; l; l = l->next) { Edje_Color_Class *cc; @@ -1042,7 +1042,7 @@ _edje_color_class_member_add(Edje *ed, char *color_class) void _edje_color_class_member_del(Edje *ed, char *color_class) { - Evas_List *members, *tmp = NULL; + Evas_List *members; if ((!ed) || (!color_class)) return; members = evas_hash_find(_edje_color_class_member_hash, color_class); @@ -1053,6 +1053,15 @@ _edje_color_class_member_del(Edje *ed, char *color_class) if (members) _edje_color_class_member_hash = evas_hash_add(_edje_color_class_member_hash, color_class, members); } +void +_edje_color_class_members_free(void) +{ + if (!_edje_color_class_member_hash) return; + + evas_hash_free(_edje_color_class_member_hash); + _edje_color_class_member_hash = NULL; +} + void _edje_color_class_on_del(Edje *ed, Edje_Part *ep) { @@ -1077,7 +1086,7 @@ _edje_text_class_find(Edje *ed, char *text_class) { Evas_List *l; - if ((!ed) || (!text_class)) return; + if ((!ed) || (!text_class)) return NULL; for (l = ed->text_classes; l; l = l->next) { Edje_Text_Class *tc; @@ -1104,7 +1113,7 @@ _edje_text_class_member_add(Edje *ed, char *text_class) void _edje_text_class_member_del(Edje *ed, char *text_class) { - Evas_List *members, *tmp = NULL; + Evas_List *members; if ((!ed) || (!text_class)) return; members = evas_hash_find(_edje_text_class_member_hash, text_class); @@ -1115,6 +1124,15 @@ _edje_text_class_member_del(Edje *ed, char *text_class) if (members) _edje_text_class_member_hash = evas_hash_add(_edje_text_class_member_hash, text_class, members); } +void +_edje_text_class_members_free(void) +{ + if (!_edje_text_class_member_hash) return; + + evas_hash_free(_edje_text_class_member_hash); + _edje_text_class_member_hash = NULL; +} + Edje * _edje_fetch(Evas_Object *obj) {