summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2013-11-08 12:24:40 +0000
committerJérémy Zurcher <jeremy@asynk.ch>2014-01-03 16:22:19 +0100
commitb158c4708dfd5d21c24a44b80668a583b0d21ce3 (patch)
treea5bb14e42f621ef42e0a43135b490e9899d8766a
parent822cff060cf07e32cbf2609378204928529f52ef (diff)
eo2: detach children when object is deleted.
-rw-r--r--src/lib/eo/eo2_base_class.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/eo/eo2_base_class.c b/src/lib/eo/eo2_base_class.c
index db257af50d..b032b01118 100644
--- a/src/lib/eo/eo2_base_class.c
+++ b/src/lib/eo/eo2_base_class.c
@@ -933,8 +933,14 @@ EAPI EO2_VOID_FUNC_BODY(eo2_constructor);
933static void 933static void
934_destructor(Eo *obj, void *class_data) 934_destructor(Eo *obj, void *class_data)
935{ 935{
936 Private_Data *pd = class_data;
937 Eo *child;
938
936 DBG("%p - %s.", obj, eo_class_name_get(MY_CLASS)); 939 DBG("%p - %s.", obj, eo_class_name_get(MY_CLASS));
937 940
941 EINA_LIST_FREE(pd->children, child)
942 eo2_do(child, eo2_parent_set(NULL));
943
938 _eo_generic_data_del_all(class_data); 944 _eo_generic_data_del_all(class_data);
939 _wref_destruct(class_data); 945 _wref_destruct(class_data);
940 _eo_callback_remove_all(class_data); 946 _eo_callback_remove_all(class_data);