From: Enlightenment S. <no-...@en...> - 2010-08-23 15:33:54
|
Log: Leak-be-gone. Author: devilhorns Date: 2010-08-23 08:33:46 -0700 (Mon, 23 Aug 2010) New Revision: 51578 Modified: trunk/PROTO/emote/src/bin/em_object.c trunk/PROTO/emote/src/bin/em_object.h trunk/PROTO/emote/src/lib/emote_object.c trunk/PROTO/emote/src/lib/emote_object.h Modified: trunk/PROTO/emote/src/bin/em_object.c =================================================================== --- trunk/PROTO/emote/src/bin/em_object.c 2010-08-23 15:04:09 UTC (rev 51577) +++ trunk/PROTO/emote/src/bin/em_object.c 2010-08-23 15:33:46 UTC (rev 51578) @@ -50,8 +50,8 @@ em_object_free(Em_Object *obj) { EM_OBJECT_CHECK(obj); + if (obj->free_att_func) obj->free_att_func(obj); obj->cleanup_func(obj); - obj->magic = EM_OBJECT_MAGIC_FREED; } EM_INTERN int Modified: trunk/PROTO/emote/src/bin/em_object.h =================================================================== --- trunk/PROTO/emote/src/bin/em_object.h 2010-08-23 15:04:09 UTC (rev 51577) +++ trunk/PROTO/emote/src/bin/em_object.h 2010-08-23 15:33:46 UTC (rev 51578) @@ -40,7 +40,7 @@ void (*free_att_func) (void *obj); void (*del_att_func) (void *obj); void *data; - unsigned char deleted : 1; + Eina_Bool deleted : 1; }; EM_INTERN void *em_object_alloc(int size, int type, Em_Object_Cleanup_Func cleanup_func); Modified: trunk/PROTO/emote/src/lib/emote_object.c =================================================================== --- trunk/PROTO/emote/src/lib/emote_object.c 2010-08-23 15:04:09 UTC (rev 51577) +++ trunk/PROTO/emote/src/lib/emote_object.c 2010-08-23 15:33:46 UTC (rev 51578) @@ -50,8 +50,8 @@ em_object_free(Em_Object *obj) { EM_OBJECT_CHECK(obj); + if (obj->free_att_func) obj->free_att_func(obj); obj->cleanup_func(obj); - obj->magic = EM_OBJECT_MAGIC_FREED; } EM_INTERN int Modified: trunk/PROTO/emote/src/lib/emote_object.h =================================================================== --- trunk/PROTO/emote/src/lib/emote_object.h 2010-08-23 15:04:09 UTC (rev 51577) +++ trunk/PROTO/emote/src/lib/emote_object.h 2010-08-23 15:33:46 UTC (rev 51578) @@ -40,7 +40,7 @@ void (*free_att_func) (void *obj); void (*del_att_func) (void *obj); void *data; - unsigned char deleted : 1; + Eina_Bool deleted : 1; }; EM_INTERN void *em_object_alloc(int size, int type, Em_Object_Cleanup_Func cleanup_func); |