forked from enlightenment/efl
edje: properly destroy color_class and text_class on an Edje_Object.
SVN revision: 75647
This commit is contained in:
parent
25feacc120
commit
c5fe5abff2
|
@ -560,3 +560,8 @@
|
||||||
2012-08-21 Guilherme Silveira
|
2012-08-21 Guilherme Silveira
|
||||||
|
|
||||||
* Fix password timeout with fixed point.
|
* Fix password timeout with fixed point.
|
||||||
|
|
||||||
|
2012-08-24 Cedric Bail
|
||||||
|
|
||||||
|
* Properly destroy color_class and text_class on an Edje_Object.
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,7 @@ Fixes:
|
||||||
* Reduce potential reentrant issue when using edje_object_signal_emit.
|
* Reduce potential reentrant issue when using edje_object_signal_emit.
|
||||||
* Call edje_object_message_signal_process also on GROUP part Edje object.
|
* Call edje_object_message_signal_process also on GROUP part Edje object.
|
||||||
* Remove memory leak when alias are present in the edj file.
|
* Remove memory leak when alias are present in the edj file.
|
||||||
|
* Properly destroy color_class and text_class on an Edje_Object.
|
||||||
|
|
||||||
Edje 1.2.0
|
Edje 1.2.0
|
||||||
|
|
||||||
|
|
|
@ -188,16 +188,29 @@ edje_shutdown(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Private Routines */
|
/* Private Routines */
|
||||||
static Eina_Bool
|
static void
|
||||||
_class_member_free(const Eina_Hash *hash __UNUSED__,
|
_class_member_free(Eina_Hash *hash,
|
||||||
const void *key,
|
void (*_edje_class_member_direct_del)(const char *class, void *l))
|
||||||
void *data,
|
|
||||||
void *fdata)
|
|
||||||
{
|
{
|
||||||
void (*_edje_class_member_direct_del)(const char *class, void *l) = fdata;
|
const char *color_class;
|
||||||
|
Eina_Iterator *it;
|
||||||
|
Eina_List *class_kill = NULL;
|
||||||
|
|
||||||
_edje_class_member_direct_del(key, data);
|
if (hash)
|
||||||
return EINA_TRUE;
|
{
|
||||||
|
it = eina_hash_iterator_key_new(hash);
|
||||||
|
EINA_ITERATOR_FOREACH(it, color_class)
|
||||||
|
class_kill = eina_list_append(class_kill, color_class);
|
||||||
|
eina_iterator_free(it);
|
||||||
|
EINA_LIST_FREE(class_kill, color_class)
|
||||||
|
{
|
||||||
|
void *l;
|
||||||
|
|
||||||
|
l = eina_hash_find(hash, color_class);
|
||||||
|
_edje_class_member_direct_del(color_class, l);
|
||||||
|
}
|
||||||
|
eina_hash_free(hash);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -254,16 +267,8 @@ _edje_del(Edje *ed)
|
||||||
free(cb);
|
free(cb);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ed->members.text_class)
|
_class_member_free(ed->members.text_class, _edje_text_class_member_direct_del);
|
||||||
{
|
_class_member_free(ed->members.color_class, _edje_color_class_member_direct_del);
|
||||||
eina_hash_foreach(ed->members.text_class, _class_member_free, _edje_text_class_member_direct_del);
|
|
||||||
eina_hash_free(ed->members.text_class);
|
|
||||||
}
|
|
||||||
if (ed->members.color_class)
|
|
||||||
{
|
|
||||||
eina_hash_foreach(ed->members.color_class, _class_member_free, _edje_color_class_member_direct_del);
|
|
||||||
eina_hash_free(ed->members.color_class);
|
|
||||||
}
|
|
||||||
free(ed);
|
free(ed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue