more memory management cleanups. fixed some warnings.
authortsauerbeck <tsauerbeck>
Mon, 12 Jan 2004 19:21:25 +0000 (19:21 +0000)
committertsauerbeck <tsauerbeck@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 12 Jan 2004 19:21:25 +0000 (19:21 +0000)
SVN revision: 8357

legacy/edje/src/lib/edje_main.c
legacy/edje/src/lib/edje_private.h
legacy/edje/src/lib/edje_util.c

index e0b839c657802cee968520484d034b8963e5a153..8e395276961f8b00fec203e6d5c40f6de75f7c10 100644 (file)
@@ -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;
 }
index 9c2968f25072e678b7e8540efe2866dbdd7f6000..4a1ca42a62f74086ea2b7c878789f0ed91c76c24 100644 (file)
@@ -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);
index 1276898da18cd9297db529572776a047b8f3853a..7b7907aeedb13e23bae0746a2a751c006cec6a67 100644 (file)
@@ -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)
 {