forked from enlightenment/efl
edje: don't forget to del text_class when destroying object.
SVN revision: 60585
This commit is contained in:
parent
6aade06b3f
commit
66098e4c82
|
@ -146,6 +146,15 @@ edje_shutdown(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Private Routines */
|
/* Private Routines */
|
||||||
|
static Eina_Bool
|
||||||
|
_text_class_member_free(const Eina_Hash *hash __UNUSED__,
|
||||||
|
const void *key,
|
||||||
|
void *data,
|
||||||
|
void *fdata)
|
||||||
|
{
|
||||||
|
_edje_text_class_member_direct_del(key, data);
|
||||||
|
return EINA_TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
_edje_del(Edje *ed)
|
_edje_del(Edje *ed)
|
||||||
|
@ -201,7 +210,11 @@ _edje_del(Edje *ed)
|
||||||
free(cb);
|
free(cb);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ed->members) eina_hash_free(ed->members);
|
if (ed->members)
|
||||||
|
{
|
||||||
|
eina_hash_foreach(ed->members, _text_class_member_free, NULL);
|
||||||
|
eina_hash_free(ed->members);
|
||||||
|
}
|
||||||
free(ed);
|
free(ed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1545,6 +1545,7 @@ void _edje_color_class_hash_free(void);
|
||||||
Edje_Text_Class *_edje_text_class_find(Edje *ed, const char *text_class);
|
Edje_Text_Class *_edje_text_class_find(Edje *ed, const char *text_class);
|
||||||
void _edje_text_class_member_add(Edje *ed, const char *text_class);
|
void _edje_text_class_member_add(Edje *ed, const char *text_class);
|
||||||
void _edje_text_class_member_del(Edje *ed, const char *text_class);
|
void _edje_text_class_member_del(Edje *ed, const char *text_class);
|
||||||
|
void _edje_text_class_member_direct_del(const char *text_class, Eina_List *lookup);
|
||||||
void _edje_text_class_members_free(void);
|
void _edje_text_class_members_free(void);
|
||||||
void _edje_text_class_hash_free(void);
|
void _edje_text_class_hash_free(void);
|
||||||
|
|
||||||
|
|
|
@ -114,6 +114,7 @@ _edje_smart_add(Evas_Object *obj)
|
||||||
evas_object_geometry_get(obj, &(ed->x), &(ed->y), &(ed->w), &(ed->h));
|
evas_object_geometry_get(obj, &(ed->x), &(ed->y), &(ed->w), &(ed->h));
|
||||||
ed->obj = obj;
|
ed->obj = obj;
|
||||||
_edje_edjes = eina_list_append(_edje_edjes, obj);
|
_edje_edjes = eina_list_append(_edje_edjes, obj);
|
||||||
|
fprintf(stderr, "living edje object: %i\n", eina_list_count(_edje_edjes));
|
||||||
/*
|
/*
|
||||||
{
|
{
|
||||||
Eina_List *l;
|
Eina_List *l;
|
||||||
|
|
|
@ -3695,6 +3695,17 @@ _edje_text_class_find(Edje *ed, const char *text_class)
|
||||||
return eina_hash_find(_edje_text_class_hash, text_class);
|
return eina_hash_find(_edje_text_class_hash, text_class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_edje_text_class_member_direct_del(const char *text_class,
|
||||||
|
Eina_List *lookup)
|
||||||
|
{
|
||||||
|
Eina_List *members;
|
||||||
|
|
||||||
|
members = eina_hash_find(_edje_text_class_member_hash, text_class);
|
||||||
|
members = eina_list_remove_list(members, lookup);
|
||||||
|
eina_hash_set(_edje_text_class_member_hash, text_class, members);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
_edje_text_class_member_add(Edje *ed, const char *text_class)
|
_edje_text_class_member_add(Edje *ed, const char *text_class)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue