set the name to NULL on _del instead of _free

Since free can be delayed, if you deleted a named object, created a new one and set it to the same name, the hash could still point to the old object.


SVN revision: 23865
This commit is contained in:
rephorm 2006-07-13 00:26:25 +00:00 committed by rephorm
parent 712a2a8c03
commit ab7d018a71
1 changed files with 2 additions and 1 deletions

View File

@ -33,7 +33,6 @@ evas_object_free(Evas_Object *obj, int clean_layer)
if (obj->smart.parent) was_smart_child = 1;
evas_object_smart_cleanup(obj);
obj->func->free(obj);
if (obj->name) evas_object_name_set(obj, NULL);
if (!was_smart_child) evas_object_release(obj, clean_layer);
if (obj->clip.clipees)
evas_list_free(obj->clip.clipees);
@ -416,6 +415,8 @@ evas_object_del(Evas_Object *obj)
return;
MAGIC_CHECK_END();
if (obj->delete_me) return;
if (obj->name) evas_object_name_set(obj, NULL);
if (!obj->layer)
{
evas_object_free(obj, 1);