summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2018-03-15 12:50:20 -0400
committerCedric Bail <cedric@osg.samsung.com>2018-03-20 17:20:56 -0700
commit4c4177ac207f982de8139c47c7afedd26ff9e15a (patch)
tree1913e890dc525621f4dec3ce281b340d81608a72
parenta1bf513920e813037756e01cc2e01770befea77c (diff)
efl: use efl_add_ref to create objects which have no parent
Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com>
-rw-r--r--src/benchmarks/eo/eo_bench_callbacks.c4
-rw-r--r--src/benchmarks/eo/eo_bench_eo_add.c6
-rw-r--r--src/benchmarks/eo/eo_bench_eo_do.c12
-rw-r--r--src/bin/elementary/test_bg.c4
-rw-r--r--src/bin/elementary/test_box.c2
-rw-r--r--src/bin/elementary/test_calendar.c2
-rw-r--r--src/bin/elementary/test_efl_gfx_map.c2
-rw-r--r--src/bin/elementary/test_evas_map.c2
-rw-r--r--src/bin/elementary/test_evas_mask.c2
-rw-r--r--src/bin/elementary/test_evas_snapshot.c2
-rw-r--r--src/bin/elementary/test_gfx_filters.c2
-rw-r--r--src/bin/elementary/test_glview.c2
-rw-r--r--src/bin/elementary/test_nstate.c2
-rw-r--r--src/bin/elementary/test_part_bg.c2
-rw-r--r--src/bin/elementary/test_part_shadow.c4
-rw-r--r--src/bin/elementary/test_photocam.c2
-rw-r--r--src/bin/elementary/test_ui_button.c2
-rw-r--r--src/bin/elementary/test_ui_clock.c2
-rw-r--r--src/bin/elementary/test_ui_panes.c2
-rw-r--r--src/bin/elementary/test_ui_popup.c16
-rw-r--r--src/bin/elementary/test_ui_progressbar.c4
-rw-r--r--src/bin/elementary/test_ui_scroller.c2
-rw-r--r--src/bin/elementary/test_ui_slider.c2
-rw-r--r--src/bin/elementary/test_ui_slider_interval.c2
-rw-r--r--src/bin/elementary/test_ui_spin.c2
-rw-r--r--src/bin/elementary/test_ui_spin_button.c2
-rw-r--r--src/bin/elementary/test_ui_table_static.c2
-rw-r--r--src/bin/elementary/test_win_dialog.c2
-rw-r--r--src/bin/elementary/test_win_indicator.c4
-rw-r--r--src/bin/elementary/test_win_stack.c4
-rw-r--r--src/examples/ecore/ecore_audio_custom.c4
-rw-r--r--src/examples/ecore/ecore_audio_playback.c8
-rw-r--r--src/examples/ecore/ecore_audio_to_ogg.c18
-rw-r--r--src/examples/ecore/ecore_idler_example.c2
-rw-r--r--src/examples/ecore/ecore_poller_example.c6
-rw-r--r--src/examples/ecore/efl_io_copier_example.c12
-rw-r--r--src/examples/ecore/efl_io_queue_example.c8
-rw-r--r--src/examples/ecore/efl_net_server_example.c6
-rw-r--r--src/examples/ecore/efl_net_server_simple_example.c2
-rw-r--r--src/examples/ecore/efl_net_socket_ssl_dialer_example.c6
-rw-r--r--src/examples/ecore/efl_net_socket_ssl_server_example.c6
-rw-r--r--src/examples/eio/eio_sentry.c2
-rw-r--r--src/examples/elementary/efl_ui_list_example_1.c2
-rw-r--r--src/examples/elementary/efl_ui_list_example_2.c2
-rw-r--r--src/examples/elementary/efl_ui_list_example_3.c2
-rw-r--r--src/examples/elementary/efl_ui_scroller_example.c2
-rw-r--r--src/examples/elementary/filemvc.c10
-rw-r--r--src/examples/elementary/fileviewlist.c4
-rw-r--r--src/examples/elementary/layout_model_connect.c4
-rw-r--r--src/lib/ecore/efl_model_composite_boolean.c2
-rw-r--r--src/lib/ecore/efl_model_composite_selection.c2
-rw-r--r--src/lib/ecore/efl_thread.c4
-rw-r--r--src/lib/ecore_con/ecore_con_eet.c6
-rw-r--r--src/lib/ecore_con/ecore_con_legacy.c12
-rw-r--r--src/lib/ecore_con/ecore_con_local_win32.c4
-rw-r--r--src/lib/ecore_con/efl_net_ip_address.c8
-rw-r--r--src/lib/ecore_con/efl_net_ssl_context.c2
-rw-r--r--src/lib/ector/cairo/ector_cairo_surface.c6
-rw-r--r--src/lib/ector/gl/ector_gl_surface.c6
-rw-r--r--src/lib/ector/software/ector_software_surface.c6
-rw-r--r--src/lib/edje/edje_main.c10
-rw-r--r--src/lib/edje/edje_multisense.c24
-rw-r--r--src/lib/eio/eio_model.c2
-rw-r--r--src/lib/elementary/efl_ui_focus_composition.c4
-rw-r--r--src/lib/elementary/efl_ui_list.c2
-rw-r--r--src/lib/elementary/elc_fileselector.c12
-rw-r--r--src/lib/elementary/elc_fileselector_button.c4
-rw-r--r--src/lib/elementary/elm_atspi_bridge.c4
-rw-r--r--src/lib/elementary/elm_config.c2
-rw-r--r--src/lib/elementary/elm_sys_notify.c2
-rw-r--r--src/lib/evas/canvas/efl_canvas_vg.c2
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_manager.c10
-rw-r--r--src/modules/evas/engines/gl_generic/evas_engine.c8
-rw-r--r--src/modules/evas/engines/software_generic/evas_engine.c8
-rw-r--r--src/tests/ecore/ecore_test_ecore_audio.c60
-rw-r--r--src/tests/ecore/ecore_test_promise2.c4
-rw-r--r--src/tests/ecore_con/ecore_con_test_efl_net_ip_address.c110
-rw-r--r--src/tests/efl/efl_test_model_composite.c8
-rw-r--r--src/tests/efl/efl_test_model_container.c2
-rw-r--r--src/tests/efl_mono/libefl_mono_native_test.c2
-rw-r--r--src/tests/eio/eio_test_sentry.c40
-rw-r--r--src/tests/elementary/elm_test_atspi.c14
-rw-r--r--src/tests/elementary/elm_test_config.c4
-rw-r--r--src/tests/elementary/elm_test_focus.c68
-rw-r--r--src/tests/elementary/elm_test_focus_common.c4
-rw-r--r--src/tests/elementary/elm_test_focus_sub.c38
-rw-r--r--src/tests/eo/access/access_main.c2
-rw-r--r--src/tests/eo/children/children_main.c2
-rw-r--r--src/tests/eo/composite_objects/composite_objects_main.c2
-rw-r--r--src/tests/eo/constructors/constructors_main.c20
-rw-r--r--src/tests/eo/function_overrides/function_overrides_main.c8
-rw-r--r--src/tests/eo/interface/interface_main.c2
-rw-r--r--src/tests/eo/mixin/mixin_main.c4
-rw-r--r--src/tests/eo/signals/signals_main.c2
-rw-r--r--src/tests/eo/suite/eo_test_class_singleton.c2
-rw-r--r--src/tests/eo/suite/eo_test_domain.c2
-rw-r--r--src/tests/eo/suite/eo_test_event.c6
-rw-r--r--src/tests/eo/suite/eo_test_general.c210
-rw-r--r--src/tests/eo/suite/eo_test_init.c2
-rw-r--r--src/tests/eo/suite/eo_test_threaded_calls.c2
-rw-r--r--src/tests/eo/suite/eo_test_value.c2
-rw-r--r--src/tests/eolian_js/eolian_js_test_constructor_method_impl.c4
102 files changed, 495 insertions, 489 deletions
diff --git a/src/benchmarks/eo/eo_bench_callbacks.c b/src/benchmarks/eo/eo_bench_callbacks.c
index 7fd145c3..7168dab 100644
--- a/src/benchmarks/eo/eo_bench_callbacks.c
+++ b/src/benchmarks/eo/eo_bench_callbacks.c
@@ -16,7 +16,7 @@ static void
16bench_eo_callbacks_add(int request) 16bench_eo_callbacks_add(int request)
17{ 17{
18 int i; 18 int i;
19 Eo *obj = efl_add(SIMPLE_CLASS, NULL); 19 Eo *obj = efl_add_ref(SIMPLE_CLASS, NULL);
20 20
21 for (i = 0 ; i < request ; i++) 21 for (i = 0 ; i < request ; i++)
22 { 22 {
@@ -52,7 +52,7 @@ bench_eo_callbacks_call(int request)
52 Eo *obj[len]; 52 Eo *obj[len];
53 for (i = 0 ; i < len ; i++) 53 for (i = 0 ; i < len ; i++)
54 { 54 {
55 obj[i] = efl_add(SIMPLE_CLASS, NULL); 55 obj[i] = efl_add_ref(SIMPLE_CLASS, NULL);
56 56
57 for (j = 0 ; j < i ; j++) 57 for (j = 0 ; j < i ; j++)
58 { 58 {
diff --git a/src/benchmarks/eo/eo_bench_eo_add.c b/src/benchmarks/eo/eo_bench_eo_add.c
index 7bd10d8..963cd3a 100644
--- a/src/benchmarks/eo/eo_bench_eo_add.c
+++ b/src/benchmarks/eo/eo_bench_eo_add.c
@@ -12,7 +12,7 @@ bench_efl_add_linear(int request)
12 int i; 12 int i;
13 Eo **objs = calloc(request, sizeof(Eo *)); 13 Eo **objs = calloc(request, sizeof(Eo *));
14 for (i = 0 ; i < request ; i++) 14 for (i = 0 ; i < request ; i++)
15 objs[i] = efl_add(SIMPLE_CLASS, NULL); 15 objs[i] = efl_add_ref(SIMPLE_CLASS, NULL);
16 16
17 for (i = 0 ; i < request ; i++) 17 for (i = 0 ; i < request ; i++)
18 efl_unref(objs[i]); 18 efl_unref(objs[i]);
@@ -25,13 +25,13 @@ bench_efl_add_jump_by_2(int request)
25 int i; 25 int i;
26 Eo **objs = calloc(request, sizeof(Eo *)); 26 Eo **objs = calloc(request, sizeof(Eo *));
27 for (i = 0 ; i < request ; i++) 27 for (i = 0 ; i < request ; i++)
28 objs[i] = efl_add(SIMPLE_CLASS, NULL); 28 objs[i] = efl_add_ref(SIMPLE_CLASS, NULL);
29 29
30 for (i = 0 ; i < request ; i += 2) 30 for (i = 0 ; i < request ; i += 2)
31 efl_unref(objs[i]); 31 efl_unref(objs[i]);
32 32
33 for (i = 0 ; i < request ; i += 2) 33 for (i = 0 ; i < request ; i += 2)
34 objs[i] = efl_add(SIMPLE_CLASS, NULL); 34 objs[i] = efl_add_ref(SIMPLE_CLASS, NULL);
35 35
36 for (i = 0 ; i < request ; i++) 36 for (i = 0 ; i < request ; i++)
37 efl_unref(objs[i]); 37 efl_unref(objs[i]);
diff --git a/src/benchmarks/eo/eo_bench_eo_do.c b/src/benchmarks/eo/eo_bench_eo_do.c
index ec69bf3..2783b91 100644
--- a/src/benchmarks/eo/eo_bench_eo_do.c
+++ b/src/benchmarks/eo/eo_bench_eo_do.c
@@ -10,7 +10,7 @@ static void
10bench_eo_do_simple(int request) 10bench_eo_do_simple(int request)
11{ 11{
12 int i; 12 int i;
13 Eo *obj = efl_add(SIMPLE_CLASS, NULL); 13 Eo *obj = efl_add_ref(SIMPLE_CLASS, NULL);
14 for (i = 0 ; i < request ; i++) 14 for (i = 0 ; i < request ; i++)
15 { 15 {
16 simple_a_set(obj, i); 16 simple_a_set(obj, i);
@@ -23,8 +23,8 @@ static void
23bench_eo_do_two_objs(int request) 23bench_eo_do_two_objs(int request)
24{ 24{
25 int i; 25 int i;
26 Eo *obj = efl_add(SIMPLE_CLASS, NULL); 26 Eo *obj = efl_add_ref(SIMPLE_CLASS, NULL);
27 Eo *obj2 = efl_add(SIMPLE_CLASS, NULL); 27 Eo *obj2 = efl_add_ref(SIMPLE_CLASS, NULL);
28 for (i = 0 ; i < request ; i++) 28 for (i = 0 ; i < request ; i++)
29 { 29 {
30 simple_a_set(obj, i); 30 simple_a_set(obj, i);
@@ -39,8 +39,8 @@ static void
39bench_eo_do_two_objs_growing_stack(int request) 39bench_eo_do_two_objs_growing_stack(int request)
40{ 40{
41 int i; 41 int i;
42 Eo *obj = efl_add(SIMPLE_CLASS, NULL); 42 Eo *obj = efl_add_ref(SIMPLE_CLASS, NULL);
43 Eo *obj2 = efl_add(SIMPLE_CLASS, NULL); 43 Eo *obj2 = efl_add_ref(SIMPLE_CLASS, NULL);
44 for (i = 0 ; i < request ; i++) 44 for (i = 0 ; i < request ; i++)
45 { 45 {
46 simple_other_call(obj, obj2, 20); 46 simple_other_call(obj, obj2, 20);
@@ -83,7 +83,7 @@ bench_eo_do_super(int request)
83 cur_klass = efl_class_new(&class_desc, SIMPLE_CLASS, NULL); 83 cur_klass = efl_class_new(&class_desc, SIMPLE_CLASS, NULL);
84 84
85 int i; 85 int i;
86 Eo *obj = efl_add(cur_klass, NULL); 86 Eo *obj = efl_add_ref(cur_klass, NULL);
87 for (i = 0 ; i < request ; i++) 87 for (i = 0 ; i < request ; i++)
88 { 88 {
89 simple_a_set(obj, i); 89 simple_a_set(obj, i);
diff --git a/src/bin/elementary/test_bg.c b/src/bin/elementary/test_bg.c
index d6e8bc3..b436e58 100644
--- a/src/bin/elementary/test_bg.c
+++ b/src/bin/elementary/test_bg.c
@@ -330,7 +330,7 @@ test_bg_window(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event
330 Evas_Object *win, *box, *cs; 330 Evas_Object *win, *box, *cs;
331 char buf[PATH_MAX]; 331 char buf[PATH_MAX];
332 332
333 win = efl_add(EFL_UI_WIN_CLASS, NULL, 333 win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
334 efl_text_set(efl_added, "Bg EOAPI (Efl.Ui.Win)"), 334 efl_text_set(efl_added, "Bg EOAPI (Efl.Ui.Win)"),
335 efl_ui_win_autodel_set(efl_added, EINA_TRUE), 335 efl_ui_win_autodel_set(efl_added, EINA_TRUE),
336 efl_ui_win_alpha_set(efl_added, 1)); 336 efl_ui_win_alpha_set(efl_added, 1));
@@ -403,7 +403,7 @@ test_bg_scale_type(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *e
403 Evas_Object *rd, *rdg; 403 Evas_Object *rd, *rdg;
404 char buf[PATH_MAX]; 404 char buf[PATH_MAX];
405 405
406 win = efl_add(EFL_UI_WIN_CLASS, NULL, 406 win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
407 efl_text_set(efl_added, "Bg EOAPI (Efl.Ui.Bg)"), 407 efl_text_set(efl_added, "Bg EOAPI (Efl.Ui.Bg)"),
408 efl_ui_win_autodel_set(efl_added, EINA_TRUE), 408 efl_ui_win_autodel_set(efl_added, EINA_TRUE),
409 efl_ui_win_alpha_set(efl_added, EINA_FALSE)); 409 efl_ui_win_alpha_set(efl_added, EINA_FALSE));
diff --git a/src/bin/elementary/test_box.c b/src/bin/elementary/test_box.c
index 5439234..98ff767 100644
--- a/src/bin/elementary/test_box.c
+++ b/src/bin/elementary/test_box.c
@@ -889,7 +889,7 @@ test_box_stack(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
889 Evas_Object *win, *bx, *o; 889 Evas_Object *win, *bx, *o;
890 char buf[PATH_MAX]; 890 char buf[PATH_MAX];
891 891
892 win = efl_add(EFL_UI_WIN_CLASS, NULL, 892 win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
893 efl_text_set(efl_added, "Efl.Ui.Box_Stack"), 893 efl_text_set(efl_added, "Efl.Ui.Box_Stack"),
894 efl_ui_win_autodel_set(efl_added, EINA_TRUE)); 894 efl_ui_win_autodel_set(efl_added, EINA_TRUE));
895 895
diff --git a/src/bin/elementary/test_calendar.c b/src/bin/elementary/test_calendar.c
index 3406439..89ac92b 100644
--- a/src/bin/elementary/test_calendar.c
+++ b/src/bin/elementary/test_calendar.c
@@ -431,7 +431,7 @@ test_efl_ui_calendar(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void
431 current_date = time(NULL) + SEC_PER_YEAR; 431 current_date = time(NULL) + SEC_PER_YEAR;
432 localtime_r(&current_date, &max_date); 432 localtime_r(&current_date, &max_date);
433 433
434 win = efl_add(EFL_UI_WIN_CLASS, NULL, 434 win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
435 efl_text_set(efl_added, "Efl Ui Calendar"), 435 efl_text_set(efl_added, "Efl Ui Calendar"),
436 efl_ui_win_autodel_set(efl_added, EINA_TRUE)); 436 efl_ui_win_autodel_set(efl_added, EINA_TRUE));
437 437
diff --git a/src/bin/elementary/test_efl_gfx_map.c b/src/bin/elementary/test_efl_gfx_map.c
index 1f06daf..19e00d4 100644
--- a/src/bin/elementary/test_efl_gfx_map.c
+++ b/src/bin/elementary/test_efl_gfx_map.c
@@ -45,7 +45,7 @@ test_efl_gfx_map(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
45 Evas_Object *win, *img; 45 Evas_Object *win, *img;
46 char buf[PATH_MAX]; 46 char buf[PATH_MAX];
47 47
48 win = efl_add(EFL_UI_WIN_CLASS, NULL, 48 win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
49 efl_text_set(efl_added, "Efl Gfx Map"), 49 efl_text_set(efl_added, "Efl Gfx Map"),
50 efl_ui_win_autodel_set(efl_added, EINA_TRUE)); 50 efl_ui_win_autodel_set(efl_added, EINA_TRUE));
51 51
diff --git a/src/bin/elementary/test_evas_map.c b/src/bin/elementary/test_evas_map.c
index 6f026cb..8f870cc 100644
--- a/src/bin/elementary/test_evas_map.c
+++ b/src/bin/elementary/test_evas_map.c
@@ -53,7 +53,7 @@ test_evas_map(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
53 Evas_Object *win, *img; 53 Evas_Object *win, *img;
54 char buf[PATH_MAX]; 54 char buf[PATH_MAX];
55 55
56 win = efl_add(EFL_UI_WIN_CLASS, NULL, 56 win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
57 efl_text_set(efl_added, "Evas Map"), 57 efl_text_set(efl_added, "Evas Map"),
58 efl_ui_win_autodel_set(efl_added, EINA_TRUE)); 58 efl_ui_win_autodel_set(efl_added, EINA_TRUE));
59 59
diff --git a/src/bin/elementary/test_evas_mask.c b/src/bin/elementary/test_evas_mask.c
index 050158c..43b1586 100644
--- a/src/bin/elementary/test_evas_mask.c
+++ b/src/bin/elementary/test_evas_mask.c
@@ -108,7 +108,7 @@ test_evas_mask(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event
108 Elm_Genlist_Item_Class *itc; 108 Elm_Genlist_Item_Class *itc;
109 char buf[PATH_MAX]; 109 char buf[PATH_MAX];
110 110
111 win = efl_add(EFL_UI_WIN_CLASS, NULL, 111 win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
112 efl_text_set(efl_added, "Evas masking demo"), 112 efl_text_set(efl_added, "Evas masking demo"),
113 efl_ui_win_autodel_set(efl_added, 1)); 113 efl_ui_win_autodel_set(efl_added, 1));
114 114
diff --git a/src/bin/elementary/test_evas_snapshot.c b/src/bin/elementary/test_evas_snapshot.c
index 48cd8a3..a483e19 100644
--- a/src/bin/elementary/test_evas_snapshot.c
+++ b/src/bin/elementary/test_evas_snapshot.c
@@ -118,7 +118,7 @@ test_evas_snapshot(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *e
118 Eo *win, *table, *o, *snap, *box; 118 Eo *win, *table, *o, *snap, *box;
119 const char *path; 119 const char *path;
120 120
121 win = efl_add(EFL_UI_WIN_CLASS, NULL, 121 win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
122 efl_text_set(efl_added, "Evas Snapshot"), 122 efl_text_set(efl_added, "Evas Snapshot"),
123 efl_ui_win_autodel_set(efl_added, 1)); 123 efl_ui_win_autodel_set(efl_added, 1));
124 124
diff --git a/src/bin/elementary/test_gfx_filters.c b/src/bin/elementary/test_gfx_filters.c
index f9b6b9b..918860c 100644
--- a/src/bin/elementary/test_gfx_filters.c
+++ b/src/bin/elementary/test_gfx_filters.c
@@ -333,7 +333,7 @@ test_gfx_filters(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve
333{ 333{
334 Eo *win, *box, *box2, *o, *text = NULL, *spinner, *code, *split, *flip, *tb; 334 Eo *win, *box, *box2, *o, *text = NULL, *spinner, *code, *split, *flip, *tb;
335 335
336 win = efl_add(EFL_UI_WIN_CLASS, NULL, 336 win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
337 efl_text_set(efl_added, "Gfx Filter Editor"), 337 efl_text_set(efl_added, "Gfx Filter Editor"),
338 efl_ui_win_autodel_set(efl_added, 1)); 338 efl_ui_win_autodel_set(efl_added, 1));
339 339
diff --git a/src/bin/elementary/test_glview.c b/src/bin/elementary/test_glview.c
index afd3844..6a133e9 100644
--- a/src/bin/elementary/test_glview.c
+++ b/src/bin/elementary/test_glview.c
@@ -644,7 +644,7 @@ _test_glview_do(Evas_GL_Context_Version version)
644 elm_config_accel_preference_set(accel); 644 elm_config_accel_preference_set(accel);
645 eina_stringshare_del(accel); 645 eina_stringshare_del(accel);
646#else 646#else
647 win = efl_add(EFL_UI_WIN_CLASS, NULL, 647 win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
648 efl_ui_win_name_set(efl_added, "glview"), 648 efl_ui_win_name_set(efl_added, "glview"),
649 efl_text_set(efl_added, "GLView"), 649 efl_text_set(efl_added, "GLView"),
650 efl_ui_win_accel_preference_set(efl_added, "gl:depth")); 650 efl_ui_win_accel_preference_set(efl_added, "gl:depth"));
diff --git a/src/bin/elementary/test_nstate.c b/src/bin/elementary/test_nstate.c
index ebc97d4..dc9a8a0 100644
--- a/src/bin/elementary/test_nstate.c
+++ b/src/bin/elementary/test_nstate.c
@@ -15,7 +15,7 @@ test_nstate(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in
15{ 15{
16 Evas_Object *win, *bx, *nstate; 16 Evas_Object *win, *bx, *nstate;
17 17
18 win = efl_add(EFL_UI_WIN_CLASS, NULL, 18 win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
19 efl_text_set(efl_added, "N-state widget"), 19 efl_text_set(efl_added, "N-state widget"),
20 elm_win_autodel_set(efl_added, EINA_TRUE)); 20 elm_win_autodel_set(efl_added, EINA_TRUE));
21 21
diff --git a/src/bin/elementary/test_part_bg.c b/src/bin/elementary/test_part_bg.c
index 5a68e33..6c8cfbd 100644
--- a/src/bin/elementary/test_part_bg.c
+++ b/src/bin/elementary/test_part_bg.c
@@ -143,7 +143,7 @@ test_part_background(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void
143 content_class[17] = EFL_UI_SPIN_CLASS; 143 content_class[17] = EFL_UI_SPIN_CLASS;
144 content_class[18] = EFL_UI_SPIN_BUTTON_CLASS; 144 content_class[18] = EFL_UI_SPIN_BUTTON_CLASS;
145 145
146 win = efl_add(EFL_UI_WIN_CLASS, NULL, 146 win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
147 efl_text_set(efl_added, "Widget Part Background"), 147 efl_text_set(efl_added, "Widget Part Background"),
148 efl_ui_win_autodel_set(efl_added, EINA_TRUE)); 148 efl_ui_win_autodel_set(efl_added, EINA_TRUE));
149 149
diff --git a/src/bin/elementary/test_part_shadow.c b/src/bin/elementary/test_part_shadow.c
index bda425d..36f71ef 100644
--- a/src/bin/elementary/test_part_shadow.c
+++ b/src/bin/elementary/test_part_shadow.c
@@ -71,7 +71,7 @@ _delete_cb(void *data, const Efl_Event *ev)
71 Test_Data *td = data; 71 Test_Data *td = data;
72 72
73 pulse_stop(td, NULL); 73 pulse_stop(td, NULL);
74 efl_del(ev->object); 74 efl_unref(ev->object);
75 free(td); 75 free(td);
76} 76}
77 77
@@ -85,7 +85,7 @@ test_part_shadow(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve
85 85
86 td = calloc(1, sizeof(*td)); 86 td = calloc(1, sizeof(*td));
87 87
88 win = efl_add(EFL_UI_WIN_CLASS, NULL, 88 win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
89 efl_ui_win_name_set(efl_added, "shadow"), 89 efl_ui_win_name_set(efl_added, "shadow"),
90 efl_text_set(efl_added, "Shadow effects")); 90 efl_text_set(efl_added, "Shadow effects"));
91 efl_event_callback_add(win, EFL_UI_WIN_EVENT_DELETE_REQUEST, _delete_cb, td); 91 efl_event_callback_add(win, EFL_UI_WIN_EVENT_DELETE_REQUEST, _delete_cb, td);
diff --git a/src/bin/elementary/test_photocam.c b/src/bin/elementary/test_photocam.c
index 0e8e2de..44fa967 100644
--- a/src/bin/elementary/test_photocam.c
+++ b/src/bin/elementary/test_photocam.c
@@ -804,7 +804,7 @@ test_image_zoomable_animated(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSE
804 Eo *win, *bx, *zoomable, *rect; 804 Eo *win, *bx, *zoomable, *rect;
805 char buf[PATH_MAX]; 805 char buf[PATH_MAX];
806 806
807 win = efl_add(EFL_UI_WIN_CLASS, NULL, 807 win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
808 efl_ui_win_type_set(efl_added, EFL_UI_WIN_BASIC), 808 efl_ui_win_type_set(efl_added, EFL_UI_WIN_BASIC),
809 efl_text_set(efl_added, "Efl.Ui.Image_Zoomable animation"), 809 efl_text_set(efl_added, "Efl.Ui.Image_Zoomable animation"),
810 efl_ui_win_autodel_set(efl_added, EINA_TRUE)); 810 efl_ui_win_autodel_set(efl_added, EINA_TRUE));
diff --git a/src/bin/elementary/test_ui_button.c b/src/bin/elementary/test_ui_button.c
index f0e3984..1d32e3f 100644
--- a/src/bin/elementary/test_ui_button.c
+++ b/src/bin/elementary/test_ui_button.c
@@ -27,7 +27,7 @@ test_ui_button(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event
27 Eo *win, *bx, *btn; 27 Eo *win, *bx, *btn;
28 char buf[PATH_MAX]; 28 char buf[PATH_MAX];
29 29
30 win = efl_add(EFL_UI_WIN_CLASS, NULL, 30 win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
31 efl_ui_win_type_set(efl_added, EFL_UI_WIN_BASIC), 31 efl_ui_win_type_set(efl_added, EFL_UI_WIN_BASIC),
32 efl_text_set(efl_added, "Efl.Ui.Button"), 32 efl_text_set(efl_added, "Efl.Ui.Button"),
33 efl_ui_win_autodel_set(efl_added, EINA_TRUE) 33 efl_ui_win_autodel_set(efl_added, EINA_TRUE)
diff --git a/src/bin/elementary/test_ui_clock.c b/src/bin/elementary/test_ui_clock.c
index ad401c3..2e667b5 100644
--- a/src/bin/elementary/test_ui_clock.c
+++ b/src/bin/elementary/test_ui_clock.c
@@ -47,7 +47,7 @@ test_ui_clock(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
47{ 47{
48 Evas_Object *win, *bx; 48 Evas_Object *win, *bx;
49 49
50 win = efl_add(EFL_UI_WIN_CLASS, NULL, 50 win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
51 efl_ui_win_type_set(efl_added, EFL_UI_WIN_BASIC), 51 efl_ui_win_type_set(efl_added, EFL_UI_WIN_BASIC),
52 efl_text_set(efl_added, "Efl.Ui.Clock"), 52 efl_text_set(efl_added, "Efl.Ui.Clock"),
53 efl_ui_win_autodel_set(efl_added, EINA_TRUE)); 53 efl_ui_win_autodel_set(efl_added, EINA_TRUE));
diff --git a/src/bin/elementary/test_ui_panes.c b/src/bin/elementary/test_ui_panes.c
index 58a70f3..03b025b 100644
--- a/src/bin/elementary/test_ui_panes.c
+++ b/src/bin/elementary/test_ui_panes.c
@@ -8,7 +8,7 @@ test_panes_minsize(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *e
8{ 8{
9 Eo *win, *panes, *panes_h; 9 Eo *win, *panes, *panes_h;
10 10
11 win = efl_add(EFL_UI_WIN_CLASS, NULL, 11 win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
12 efl_ui_win_type_set(efl_added, EFL_UI_WIN_BASIC), 12 efl_ui_win_type_set(efl_added, EFL_UI_WIN_BASIC),
13 efl_text_set(efl_added, "Efl.Ui.Panes"), 13 efl_text_set(efl_added, "Efl.Ui.Panes"),
14 efl_ui_win_autodel_set(efl_added, EINA_TRUE) 14 efl_ui_win_autodel_set(efl_added, EINA_TRUE)
diff --git a/src/bin/elementary/test_ui_popup.c b/src/bin/elementary/test_ui_popup.c
index e94c1b6..c0115cc 100644
--- a/src/bin/elementary/test_ui_popup.c
+++ b/src/bin/elementary/test_ui_popup.c
@@ -213,7 +213,7 @@ static void
213_win_del(void *data, const Efl_Event *ev EINA_UNUSED) 213_win_del(void *data, const Efl_Event *ev EINA_UNUSED)
214{ 214{
215 efl_ui_popup_data *p_data = data; 215 efl_ui_popup_data *p_data = data;
216 efl_del(p_data->panel_win); 216 efl_unref(p_data->panel_win);
217 free(p_data); 217 free(p_data);
218 printf("window is deleted\n"); 218 printf("window is deleted\n");
219} 219}
@@ -222,7 +222,7 @@ static void
222_panel_win_del(void *data, const Efl_Event *ev EINA_UNUSED) 222_panel_win_del(void *data, const Efl_Event *ev EINA_UNUSED)
223{ 223{
224 efl_ui_popup_data *p_data = data; 224 efl_ui_popup_data *p_data = data;
225 efl_del(p_data->win); 225 efl_unref(p_data->win);
226 free(p_data); 226 free(p_data);
227 printf("window is deleted\n"); 227 printf("window is deleted\n");
228} 228}
@@ -232,14 +232,14 @@ test_ui_popup(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
232{ 232{
233 efl_ui_popup_data *p_data = (efl_ui_popup_data*)calloc(1, sizeof(efl_ui_popup_data)); 233 efl_ui_popup_data *p_data = (efl_ui_popup_data*)calloc(1, sizeof(efl_ui_popup_data));
234 234
235 Eo *win = efl_add(EFL_UI_WIN_CLASS, NULL, 235 Eo *win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
236 efl_text_set(efl_added, "Efl.Ui.Popup"), 236 efl_text_set(efl_added, "Efl.Ui.Popup"),
237 efl_ui_win_autodel_set(efl_added, EINA_TRUE)); 237 efl_ui_win_autodel_set(efl_added, EINA_TRUE));
238 efl_event_callback_add(win, EFL_UI_WIN_EVENT_DELETE_REQUEST, _win_del, p_data); 238 efl_event_callback_add(win, EFL_UI_WIN_EVENT_DELETE_REQUEST, _win_del, p_data);
239 239
240 efl_gfx_size_set(win, EINA_SIZE2D(500, 500)); 240 efl_gfx_size_set(win, EINA_SIZE2D(500, 500));
241 241
242 Eo *panel_win = efl_add(EFL_UI_WIN_CLASS, NULL, 242 Eo *panel_win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
243 efl_text_set(efl_added, "Efl.Ui.Popup Panel"), 243 efl_text_set(efl_added, "Efl.Ui.Popup Panel"),
244 efl_ui_win_autodel_set(efl_added, EINA_TRUE)); 244 efl_ui_win_autodel_set(efl_added, EINA_TRUE));
245 efl_event_callback_add(panel_win, EFL_UI_WIN_EVENT_DELETE_REQUEST, _panel_win_del, p_data); 245 efl_event_callback_add(panel_win, EFL_UI_WIN_EVENT_DELETE_REQUEST, _panel_win_del, p_data);
@@ -351,7 +351,7 @@ test_ui_popup_alert(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *
351{ 351{
352 char buf[PATH_MAX]; 352 char buf[PATH_MAX];
353 353
354 Eo *win = efl_add(EFL_UI_WIN_CLASS, NULL, 354 Eo *win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
355 efl_text_set(efl_added, "Efl.Ui.Popup.Alert"), 355 efl_text_set(efl_added, "Efl.Ui.Popup.Alert"),
356 efl_ui_win_autodel_set(efl_added, EINA_TRUE)); 356 efl_ui_win_autodel_set(efl_added, EINA_TRUE));
357 357
@@ -506,7 +506,7 @@ _alert_scroll_case5_cb(void *data, const Efl_Event *ev EINA_UNUSED)
506void 506void
507test_ui_popup_alert_scroll(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) 507test_ui_popup_alert_scroll(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
508{ 508{
509 Eo *win = efl_add(EFL_UI_WIN_CLASS, NULL, 509 Eo *win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
510 efl_text_set(efl_added, "Efl.Ui.Popup.Alert.Scroll"), 510 efl_text_set(efl_added, "Efl.Ui.Popup.Alert.Scroll"),
511 efl_ui_win_autodel_set(efl_added, EINA_TRUE)); 511 efl_ui_win_autodel_set(efl_added, EINA_TRUE));
512 512
@@ -889,7 +889,7 @@ _alert_text_case14_cb(void *data, const Efl_Event *ev EINA_UNUSED)
889void 889void
890test_ui_popup_alert_text(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) 890test_ui_popup_alert_text(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
891{ 891{
892 Eo *win = efl_add(EFL_UI_WIN_CLASS, NULL, 892 Eo *win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
893 efl_text_set(efl_added, "Efl.Ui.Popup.Alert.Text"), 893 efl_text_set(efl_added, "Efl.Ui.Popup.Alert.Text"),
894 efl_ui_win_autodel_set(efl_added, EINA_TRUE)); 894 efl_ui_win_autodel_set(efl_added, EINA_TRUE));
895 895
@@ -999,7 +999,7 @@ test_ui_popup_anchor(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void
999 999
1000 char buf[PATH_MAX]; 1000 char buf[PATH_MAX];
1001 1001
1002 Eo *win = efl_add(EFL_UI_WIN_CLASS, NULL, 1002 Eo *win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
1003 efl_text_set(efl_added, "Efl.Ui.Popup.Anchor"), 1003 efl_text_set(efl_added, "Efl.Ui.Popup.Anchor"),
1004 efl_ui_win_autodel_set(efl_added, EINA_TRUE)); 1004 efl_ui_win_autodel_set(efl_added, EINA_TRUE));
1005 efl_event_callback_add(win, EFL_UI_WIN_EVENT_DELETE_REQUEST, _win_del, p_data); 1005 efl_event_callback_add(win, EFL_UI_WIN_EVENT_DELETE_REQUEST, _win_del, p_data);
diff --git a/src/bin/elementary/test_ui_progressbar.c b/src/bin/elementary/test_ui_progressbar.c
index 0af6c6a..09a0e70 100644
--- a/src/bin/elementary/test_ui_progressbar.c
+++ b/src/bin/elementary/test_ui_progressbar.c
@@ -104,7 +104,7 @@ _win_delete_req_cb(void *d, const Efl_Event *ev EINA_UNUSED)
104 pbdata *pd = d; 104 pbdata *pd = d;
105 105
106 if (pd->timer) ecore_timer_del(pd->timer); 106 if (pd->timer) ecore_timer_del(pd->timer);
107 efl_del(pd->win); 107 efl_unref(pd->win);
108 free(pd); 108 free(pd);
109} 109}
110 110
@@ -117,7 +117,7 @@ test_ui_progressbar(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, void *event_inf
117 117
118 pd = (pbdata *)calloc(1, sizeof(pbdata)); 118 pd = (pbdata *)calloc(1, sizeof(pbdata));
119 119
120 pd->win = win = efl_add(EFL_UI_WIN_CLASS, NULL, 120 pd->win = win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
121 efl_ui_win_type_set(efl_added, EFL_UI_WIN_BASIC), 121 efl_ui_win_type_set(efl_added, EFL_UI_WIN_BASIC),
122 efl_text_set(efl_added, "Efl.Ui.Progressbar"), 122 efl_text_set(efl_added, "Efl.Ui.Progressbar"),
123 efl_ui_win_autodel_set(efl_added, EINA_TRUE), 123 efl_ui_win_autodel_set(efl_added, EINA_TRUE),
diff --git a/src/bin/elementary/test_ui_scroller.c b/src/bin/elementary/test_ui_scroller.c
index 275e9ee..4899b7d 100644
--- a/src/bin/elementary/test_ui_scroller.c
+++ b/src/bin/elementary/test_ui_scroller.c
@@ -28,7 +28,7 @@ test_efl_ui_scroller(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void
28 Eo *win, *sc, *sc2, *sc3, *bx, *bx2, *gd, *gd2; 28 Eo *win, *sc, *sc2, *sc3, *bx, *bx2, *gd, *gd2;
29 int i, j; 29 int i, j;
30 30
31 win = efl_add(EFL_UI_WIN_CLASS, NULL, 31 win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
32 efl_ui_win_type_set(efl_added, EFL_UI_WIN_BASIC), 32 efl_ui_win_type_set(efl_added, EFL_UI_WIN_BASIC),
33 efl_text_set(efl_added, "Efl Ui Scroller"), 33 efl_text_set(efl_added, "Efl Ui Scroller"),
34 efl_ui_win_autodel_set(efl_added, EINA_TRUE)); 34 efl_ui_win_autodel_set(efl_added, EINA_TRUE));
diff --git a/src/bin/elementary/test_ui_slider.c b/src/bin/elementary/test_ui_slider.c
index eea45b0..ee4d198 100644
--- a/src/bin/elementary/test_ui_slider.c
+++ b/src/bin/elementary/test_ui_slider.c
@@ -33,7 +33,7 @@ test_ui_slider(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event
33 double step; 33 double step;
34 char buf[PATH_MAX]; 34 char buf[PATH_MAX];
35 35
36 win = efl_add(EFL_UI_WIN_CLASS, NULL, 36 win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
37 efl_ui_win_type_set(efl_added, EFL_UI_WIN_BASIC), 37 efl_ui_win_type_set(efl_added, EFL_UI_WIN_BASIC),
38 efl_text_set(efl_added, "Efl.Ui.Slider"), 38 efl_text_set(efl_added, "Efl.Ui.Slider"),
39 efl_ui_win_autodel_set(efl_added, EINA_TRUE)); 39 efl_ui_win_autodel_set(efl_added, EINA_TRUE));
diff --git a/src/bin/elementary/test_ui_slider_interval.c b/src/bin/elementary/test_ui_slider_interval.c
index 46b202b0..60ff000 100644
--- a/src/bin/elementary/test_ui_slider_interval.c
+++ b/src/bin/elementary/test_ui_slider_interval.c
@@ -32,7 +32,7 @@ test_slider_interval(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void
32 Eo *win, *bx, *hbx; 32 Eo *win, *bx, *hbx;
33 double step; 33 double step;
34 34
35 win = efl_add(EFL_UI_WIN_CLASS, NULL, 35 win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
36 efl_ui_win_type_set(efl_added, EFL_UI_WIN_BASIC), 36 efl_ui_win_type_set(efl_added, EFL_UI_WIN_BASIC),
37 efl_text_set(efl_added, "Efl.Ui.Slider_Interval"), 37 efl_text_set(efl_added, "Efl.Ui.Slider_Interval"),
38 efl_ui_win_autodel_set(efl_added, EINA_TRUE)); 38 efl_ui_win_autodel_set(efl_added, EINA_TRUE));
diff --git a/src/bin/elementary/test_ui_spin.c b/src/bin/elementary/test_ui_spin.c
index ba0a166..b2ec5aa 100644
--- a/src/bin/elementary/test_ui_spin.c
+++ b/src/bin/elementary/test_ui_spin.c
@@ -36,7 +36,7 @@ test_ui_spin(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_i
36{ 36{
37 Eo *win, *bx, *sp; 37 Eo *win, *bx, *sp;
38 38
39 win = efl_add(EFL_UI_WIN_CLASS, NULL, 39 win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
40 efl_ui_win_type_set(efl_added, EFL_UI_WIN_BASIC), 40 efl_ui_win_type_set(efl_added, EFL_UI_WIN_BASIC),
41 efl_text_set(efl_added, "Efl.Ui.Spin"), 41 efl_text_set(efl_added, "Efl.Ui.Spin"),
42 efl_ui_win_autodel_set(efl_added, EINA_TRUE)); 42 efl_ui_win_autodel_set(efl_added, EINA_TRUE));
diff --git a/src/bin/elementary/test_ui_spin_button.c b/src/bin/elementary/test_ui_spin_button.c
index ddb93f3..5befcb4 100644
--- a/src/bin/elementary/test_ui_spin_button.c
+++ b/src/bin/elementary/test_ui_spin_button.c
@@ -14,7 +14,7 @@ test_ui_spin_button(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *
14{ 14{
15 Eo *win, *bx; 15 Eo *win, *bx;
16 16
17 win = efl_add(EFL_UI_WIN_CLASS, NULL, 17 win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
18 efl_ui_win_type_set(efl_added, EFL_UI_WIN_BASIC), 18 efl_ui_win_type_set(efl_added, EFL_UI_WIN_BASIC),
19 efl_text_set(efl_added, "Efl.Ui.Spin_Button"), 19 efl_text_set(efl_added, "Efl.Ui.Spin_Button"),
20 efl_ui_win_autodel_set(efl_added, EINA_TRUE)); 20 efl_ui_win_autodel_set(efl_added, EINA_TRUE));
diff --git a/src/bin/elementary/test_ui_table_static.c b/src/bin/elementary/test_ui_table_static.c
index 8681e7a..751453f 100644
--- a/src/bin/elementary/test_ui_table_static.c
+++ b/src/bin/elementary/test_ui_table_static.c
@@ -104,7 +104,7 @@ test_ui_table_static(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void
104 Eo *win, *table, *bt, *rc, *en; 104 Eo *win, *table, *bt, *rc, *en;
105 api_data *api = calloc(1, sizeof(*api)); 105 api_data *api = calloc(1, sizeof(*api));
106 106
107 win = efl_add(EFL_UI_WIN_CLASS, NULL, 107 win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
108 efl_ui_win_name_set(efl_added, "table"), 108 efl_ui_win_name_set(efl_added, "table"),
109 efl_text_set(efl_added, "Table"), 109 efl_text_set(efl_added, "Table"),
110 efl_ui_win_autodel_set(efl_added, EINA_TRUE), 110 efl_ui_win_autodel_set(efl_added, EINA_TRUE),
diff --git a/src/bin/elementary/test_win_dialog.c b/src/bin/elementary/test_win_dialog.c
index 7a10c25..22d4f35 100644
--- a/src/bin/elementary/test_win_dialog.c
+++ b/src/bin/elementary/test_win_dialog.c
@@ -101,7 +101,7 @@ _bt4_clicked_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *even
101{ 101{
102 Efl_Canvas_Object *dia, *lb; 102 Efl_Canvas_Object *dia, *lb;
103 103
104 dia = efl_add(EFL_UI_WIN_CLASS, NULL, 104 dia = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
105 efl_ui_win_type_set(efl_added, EFL_UI_WIN_DIALOG_BASIC), 105 efl_ui_win_type_set(efl_added, EFL_UI_WIN_DIALOG_BASIC),
106 efl_ui_win_name_set(efl_added, "window-dia-4"), 106 efl_ui_win_name_set(efl_added, "window-dia-4"),
107 efl_ui_win_autodel_set(efl_added, EINA_TRUE), 107 efl_ui_win_autodel_set(efl_added, EINA_TRUE),
diff --git a/src/bin/elementary/test_win_indicator.c b/src/bin/elementary/test_win_indicator.c
index d459a9e..72fad0a 100644
--- a/src/bin/elementary/test_win_indicator.c
+++ b/src/bin/elementary/test_win_indicator.c
@@ -14,7 +14,7 @@ _create_indicator(void)
14{ 14{
15 const char *indi_name; 15 const char *indi_name;
16 16
17 Eo *win = efl_add(EFL_UI_WIN_SOCKET_CLASS, NULL, 17 Eo *win = efl_add_ref(EFL_UI_WIN_SOCKET_CLASS, NULL,
18 efl_text_set(efl_added, "indicator"), 18 efl_text_set(efl_added, "indicator"),
19 efl_ui_win_autodel_set(efl_added, EINA_TRUE), 19 efl_ui_win_autodel_set(efl_added, EINA_TRUE),
20 efl_ui_win_alpha_set(efl_added, EINA_TRUE)); 20 efl_ui_win_alpha_set(efl_added, EINA_TRUE));
@@ -91,7 +91,7 @@ test_win_indicator(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *e
91 indicator = _create_indicator(); 91 indicator = _create_indicator();
92 92
93 // FIXME: Resizing window should no cause sizing issues! 93 // FIXME: Resizing window should no cause sizing issues!
94 win = efl_add(EFL_UI_WIN_CLASS, NULL, 94 win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
95 efl_ui_win_type_set(efl_added, EFL_UI_WIN_BASIC), 95 efl_ui_win_type_set(efl_added, EFL_UI_WIN_BASIC),
96 efl_text_set(efl_added, "Efl.Win.Indicator"), 96 efl_text_set(efl_added, "Efl.Win.Indicator"),
97 efl_gfx_size_hint_max_set(efl_added, EINA_SIZE2D(300, -1)), 97 efl_gfx_size_hint_max_set(efl_added, EINA_SIZE2D(300, -1)),
diff --git a/src/bin/elementary/test_win_stack.c b/src/bin/elementary/test_win_stack.c
index 18f7c0f..d13072d 100644
--- a/src/bin/elementary/test_win_stack.c
+++ b/src/bin/elementary/test_win_stack.c
@@ -18,13 +18,13 @@ _win_new(Evas_Object *stack_top, const char *title)
18 Evas_Object *bg, *bx, *bt, *lb, *win; 18 Evas_Object *bg, *bx, *bt, *lb, *win;
19 19
20 if (level >= 3) 20 if (level >= 3)
21 win = efl_add(EFL_UI_WIN_CLASS, NULL, 21 win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
22 efl_ui_win_name_set(efl_added, "window-stack"), 22 efl_ui_win_name_set(efl_added, "window-stack"),
23 efl_ui_win_type_set(efl_added, ELM_WIN_NAVIFRAME_BASIC), 23 efl_ui_win_type_set(efl_added, ELM_WIN_NAVIFRAME_BASIC),
24 efl_text_set(efl_added, title), 24 efl_text_set(efl_added, title),
25 efl_ui_win_autodel_set(efl_added, EINA_TRUE)); 25 efl_ui_win_autodel_set(efl_added, EINA_TRUE));
26 else 26 else
27 win = efl_add(EFL_UI_WIN_CLASS, NULL, 27 win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
28 efl_ui_win_name_set(efl_added, "window-stack"), 28 efl_ui_win_name_set(efl_added, "window-stack"),
29 efl_ui_win_type_set(efl_added, ELM_WIN_DIALOG_BASIC), 29 efl_ui_win_type_set(efl_added, ELM_WIN_DIALOG_BASIC),
30 efl_text_set(efl_added, title), 30 efl_text_set(efl_added, title),
diff --git a/src/examples/ecore/ecore_audio_custom.c b/src/examples/ecore/ecore_audio_custom.c
index 8089918..b0d26a1 100644
--- a/src/examples/ecore/ecore_audio_custom.c
+++ b/src/examples/ecore/ecore_audio_custom.c
@@ -56,9 +56,9 @@ main(int argc, const char *argv[])
56 56
57 ecore_app_args_set(argc, argv); 57 ecore_app_args_set(argc, argv);
58 58
59 out = efl_add(ECORE_AUDIO_OBJ_OUT_PULSE_CLASS, NULL); 59 out = efl_add_ref(ECORE_AUDIO_OBJ_OUT_PULSE_CLASS, NULL);
60 60
61 in = efl_add(ECORE_AUDIO_OBJ_IN_CLASS, NULL); 61 in = efl_add_ref(ECORE_AUDIO_OBJ_IN_CLASS, NULL);
62 if (!in) 62 if (!in)
63 { 63 {
64 printf("error when creating ecore audio source.\n"); 64 printf("error when creating ecore audio source.\n");
diff --git a/src/examples/ecore/ecore_audio_playback.c b/src/examples/ecore/ecore_audio_playback.c
index 3171303..c659f09 100644
--- a/src/examples/ecore/ecore_audio_playback.c
+++ b/src/examples/ecore/ecore_audio_playback.c
@@ -201,7 +201,7 @@ static void _play_finished(void *data EINA_UNUSED, const Efl_Event *event)
201 201
202 inputs = eina_list_remove(inputs, event->object); 202 inputs = eina_list_remove(inputs, event->object);
203 ret = ecore_audio_obj_out_input_detach(out, event->object); 203 ret = ecore_audio_obj_out_input_detach(out, event->object);
204 efl_del(event->object); 204 efl_unref(event->object);
205 205
206 if (!ret) 206 if (!ret)
207 printf("Could not detach input %s\n", name); 207 printf("Could not detach input %s\n", name);
@@ -252,7 +252,7 @@ main(int argc, const char *argv[])
252 { 252 {
253 if (!strncmp(argv[i], "tone:", 5)) 253 if (!strncmp(argv[i], "tone:", 5))
254 { 254 {
255 in = efl_add(ECORE_AUDIO_OBJ_IN_TONE_CLASS, NULL); 255 in = efl_add_ref(ECORE_AUDIO_OBJ_IN_TONE_CLASS, NULL);
256 if (!in) 256 if (!in)
257 { 257 {
258 printf("error when creating ecore audio source.\n"); 258 printf("error when creating ecore audio source.\n");
@@ -276,7 +276,7 @@ main(int argc, const char *argv[])
276 } 276 }
277 else 277 else
278 { 278 {
279 in = efl_add(ECORE_AUDIO_OBJ_IN_SNDFILE_CLASS, NULL); 279 in = efl_add_ref(ECORE_AUDIO_OBJ_IN_SNDFILE_CLASS, NULL);
280 if (!in) 280 if (!in)
281 { 281 {
282 printf("error when creating ecore audio source.\n"); 282 printf("error when creating ecore audio source.\n");
@@ -307,7 +307,7 @@ main(int argc, const char *argv[])
307 307
308 printf("Start: %s (%0.2fs)\n", name, length); 308 printf("Start: %s (%0.2fs)\n", name, length);
309 309
310 out = efl_add(ECORE_AUDIO_OBJ_OUT_PULSE_CLASS, NULL); 310 out = efl_add_ref(ECORE_AUDIO_OBJ_OUT_PULSE_CLASS, NULL);
311 ret = ecore_audio_obj_out_input_attach(out, in); 311 ret = ecore_audio_obj_out_input_attach(out, in);
312 if (!ret) 312 if (!ret)
313 printf("Could not attach input %s\n", name); 313 printf("Could not attach input %s\n", name);
diff --git a/src/examples/ecore/ecore_audio_to_ogg.c b/src/examples/ecore/ecore_audio_to_ogg.c
index 194e31e..756e69a 100644
--- a/src/examples/ecore/ecore_audio_to_ogg.c
+++ b/src/examples/ecore/ecore_audio_to_ogg.c
@@ -24,8 +24,8 @@ static void _play_finished(void *data EINA_UNUSED, const Efl_Event *event)
24 printf("Done: %s\n", name); 24 printf("Done: %s\n", name);
25 25
26 ecore_audio_obj_in_output_get(event->object, &out); 26 ecore_audio_obj_in_output_get(event->object, &out);
27 efl_del(event->object); 27 efl_unref(event->object);
28 efl_del(out); 28 efl_unref(out);
29 29
30 ecore_main_loop_quit(); 30 ecore_main_loop_quit();
31 31
@@ -49,31 +49,31 @@ main(int argc, char *argv[])
49 ecore_audio_init(); 49 ecore_audio_init();
50 50
51 51
52 in = efl_add(ECORE_AUDIO_OBJ_IN_SNDFILE_CLASS, NULL); 52 in = efl_add_ref(ECORE_AUDIO_OBJ_IN_SNDFILE_CLASS, NULL);
53 efl_name_set(in, basename(argv[1])); 53 efl_name_set(in, basename(argv[1]));
54 ret = ecore_audio_obj_source_set(in, argv[1]); 54 ret = ecore_audio_obj_source_set(in, argv[1]);
55 if (!ret) { 55 if (!ret) {
56 printf("Could not set %s as input\n", argv[1]); 56 printf("Could not set %s as input\n", argv[1]);
57 efl_del(in); 57 efl_unref(in);
58 return 1; 58 return 1;
59 } 59 }
60 60
61 efl_event_callback_add(in, ECORE_AUDIO_EV_IN_STOPPED, _play_finished, NULL); 61 efl_event_callback_add(in, ECORE_AUDIO_EV_IN_STOPPED, _play_finished, NULL);
62 62
63 out = efl_add(ECORE_AUDIO_OBJ_OUT_SNDFILE_CLASS, NULL); 63 out = efl_add_ref(ECORE_AUDIO_OBJ_OUT_SNDFILE_CLASS, NULL);
64 ret = ecore_audio_obj_source_set(out, argv[2]); 64 ret = ecore_audio_obj_source_set(out, argv[2]);
65 if (!ret) { 65 if (!ret) {
66 printf("Could not set %s as output\n", argv[2]); 66 printf("Could not set %s as output\n", argv[2]);
67 efl_del(in); 67 efl_unref(in);
68 efl_del(out); 68 efl_unref(out);
69 return 1; 69 return 1;
70 } 70 }
71 71
72 ret = ecore_audio_obj_out_input_attach(out, in); 72 ret = ecore_audio_obj_out_input_attach(out, in);
73 if (!ret) { 73 if (!ret) {
74 printf("Could not attach input\n"); 74 printf("Could not attach input\n");
75 efl_del(out); 75 efl_unref(out);
76 efl_del(in); 76 efl_unref(in);
77 return 1; 77 return 1;
78 } 78 }
79 79
diff --git a/src/examples/ecore/ecore_idler_example.c b/src/examples/ecore/ecore_idler_example.c
index 53e7d6f..2185210 100644
--- a/src/examples/ecore/ecore_idler_example.c
+++ b/src/examples/ecore/ecore_idler_example.c
@@ -110,7 +110,7 @@ main(void)
110 ctxt.enterer = ecore_idle_enterer_add(_enterer_cb, &ctxt); 110 ctxt.enterer = ecore_idle_enterer_add(_enterer_cb, &ctxt);
111 ctxt.exiter = ecore_idle_exiter_add(_exiter_cb, &ctxt); 111 ctxt.exiter = ecore_idle_exiter_add(_exiter_cb, &ctxt);
112 ctxt.idler = ecore_idler_add(_idler_cb, &ctxt); 112 ctxt.idler = ecore_idler_add(_idler_cb, &ctxt);
113// ctxt.idler = efl_add(ECORE_IDLER_CLASS, NULL, ecore_idler_constructor(efl_added, _idler_cb, &ctxt)); 113// ctxt.idler = efl_add_ref(ECORE_IDLER_CLASS, NULL, ecore_idler_constructor(efl_added, _idler_cb, &ctxt));
114 ctxt.handler = ecore_event_handler_add(_event_type, 114 ctxt.handler = ecore_event_handler_add(_event_type,
115 _event_handler_cb, 115 _event_handler_cb,
116 &ctxt); 116 &ctxt);
diff --git a/src/examples/ecore/ecore_poller_example.c b/src/examples/ecore/ecore_poller_example.c
index 6c55dbc..3cbbcc5 100644
--- a/src/examples/ecore/ecore_poller_example.c
+++ b/src/examples/ecore/ecore_poller_example.c
@@ -48,9 +48,9 @@ main(void)
48 poller2 = ecore_poller_add(ECORE_POLLER_CORE, 8, _poller_print_cb, str2); 48 poller2 = ecore_poller_add(ECORE_POLLER_CORE, 8, _poller_print_cb, str2);
49 poller3 = ecore_poller_add(ECORE_POLLER_CORE, 30, _poller_quit_cb, str3); 49 poller3 = ecore_poller_add(ECORE_POLLER_CORE, 30, _poller_quit_cb, str3);
50 50
51// poller1 = efl_add(ECORE_POLLER_CLASS, NULL, // ecore_poller_constructor(efl_added, ECORE_POLLER_CORE, 4, _poller_print_cb, str1)); 51// poller1 = efl_add_ref(ECORE_POLLER_CLASS, NULL, // ecore_poller_constructor(efl_added, ECORE_POLLER_CORE, 4, _poller_print_cb, str1));
52// poller2 = efl_add(ECORE_POLLER_CLASS, NULL, // ecore_poller_constructor(efl_added, ECORE_POLLER_CORE, 8, _poller_print_cb, str2)); 52// poller2 = efl_add_ref(ECORE_POLLER_CLASS, NULL, // ecore_poller_constructor(efl_added, ECORE_POLLER_CORE, 8, _poller_print_cb, str2));
53// poller3 = efl_add(ECORE_POLLER_CLASS, NULL, // ecore_poller_constructor(efl_added, ECORE_POLLER_CORE, 20, _poller_quit_cb, str3)); 53// poller3 = efl_add_ref(ECORE_POLLER_CLASS, NULL, // ecore_poller_constructor(efl_added, ECORE_POLLER_CORE, 20, _poller_quit_cb, str3));
54 54
55 55
56 ecore_main_loop_begin(); 56 ecore_main_loop_begin();
diff --git a/src/examples/ecore/efl_io_copier_example.c b/src/examples/ecore/efl_io_copier_example.c
index 016b448..b7e526b 100644
--- a/src/examples/ecore/efl_io_copier_example.c
+++ b/src/examples/ecore/efl_io_copier_example.c
@@ -452,7 +452,7 @@ efl_main(void *data EINA_UNUSED,
452 452
453 if (strcmp(input_fname, ":stdin:") == 0) 453 if (strcmp(input_fname, ":stdin:") == 0)
454 { 454 {
455 input = efl_add(EFL_IO_STDIN_CLASS, NULL, 455 input = efl_add_ref(EFL_IO_STDIN_CLASS, NULL,
456 efl_event_callback_array_add(efl_added, input_cbs(), NULL)); 456 efl_event_callback_array_add(efl_added, input_cbs(), NULL));
457 if (!input) 457 if (!input)
458 { 458 {
@@ -662,7 +662,7 @@ efl_main(void *data EINA_UNUSED,
662 else 662 else
663 { 663 {
664 /* regular file, open with flags: read-only and close-on-exec */ 664 /* regular file, open with flags: read-only and close-on-exec */
665 input = efl_add(EFL_IO_FILE_CLASS, NULL, 665 input = efl_add_ref(EFL_IO_FILE_CLASS, NULL,
666 efl_file_set(efl_added, input_fname, NULL), /* mandatory */ 666 efl_file_set(efl_added, input_fname, NULL), /* mandatory */
667 efl_io_file_flags_set(efl_added, O_RDONLY), /* default */ 667 efl_io_file_flags_set(efl_added, O_RDONLY), /* default */
668 efl_io_closer_close_on_exec_set(efl_added, EINA_TRUE), /* recommended, set *after* flags, or include O_CLOEXEC in flags -- be careful with _WIN32 that doesn't support it. */ 668 efl_io_closer_close_on_exec_set(efl_added, EINA_TRUE), /* recommended, set *after* flags, or include O_CLOEXEC in flags -- be careful with _WIN32 that doesn't support it. */
@@ -679,7 +679,7 @@ efl_main(void *data EINA_UNUSED,
679 679
680 if (strcmp(output_fname, ":stdout:") == 0) 680 if (strcmp(output_fname, ":stdout:") == 0)
681 { 681 {
682 output = efl_add(EFL_IO_STDOUT_CLASS, NULL, 682 output = efl_add_ref(EFL_IO_STDOUT_CLASS, NULL,
683 efl_event_callback_array_add(efl_added, output_cbs(), NULL) /* optional */ 683 efl_event_callback_array_add(efl_added, output_cbs(), NULL) /* optional */
684 ); 684 );
685 if (!output) 685 if (!output)
@@ -691,7 +691,7 @@ efl_main(void *data EINA_UNUSED,
691 } 691 }
692 else if (strcmp(output_fname, ":stderr:") == 0) 692 else if (strcmp(output_fname, ":stderr:") == 0)
693 { 693 {
694 output = efl_add(EFL_IO_STDERR_CLASS, NULL, 694 output = efl_add_ref(EFL_IO_STDERR_CLASS, NULL,
695 efl_event_callback_array_add(efl_added, output_cbs(), NULL) /* optional */ 695 efl_event_callback_array_add(efl_added, output_cbs(), NULL) /* optional */
696 ); 696 );
697 if (!output) 697 if (!output)
@@ -718,7 +718,7 @@ efl_main(void *data EINA_UNUSED,
718 * When finished get the efl_io_buffer_slice_get(), see 718 * When finished get the efl_io_buffer_slice_get(), see
719 * _copier_done(). 719 * _copier_done().
720 */ 720 */
721 output = efl_add(EFL_IO_BUFFER_CLASS, NULL, 721 output = efl_add_ref(EFL_IO_BUFFER_CLASS, NULL,
722 efl_event_callback_array_add(efl_added, output_cbs(), NULL), /* optional */ 722 efl_event_callback_array_add(efl_added, output_cbs(), NULL), /* optional */
723 efl_event_callback_array_add(efl_added, output_buffer_cbs(), NULL) /* optional */ 723 efl_event_callback_array_add(efl_added, output_buffer_cbs(), NULL) /* optional */
724 ); 724 );
@@ -938,7 +938,7 @@ efl_main(void *data EINA_UNUSED,
938 /* regular file, open with flags: write-only, close-on-exec, 938 /* regular file, open with flags: write-only, close-on-exec,
939 * create if did not exist and truncate if exist. 939 * create if did not exist and truncate if exist.
940 */ 940 */
941 output = efl_add(EFL_IO_FILE_CLASS, NULL, 941 output = efl_add_ref(EFL_IO_FILE_CLASS, NULL,
942 efl_file_set(efl_added, output_fname, NULL), /* mandatory */ 942 efl_file_set(efl_added, output_fname, NULL), /* mandatory */
943 efl_io_file_flags_set(efl_added, O_WRONLY | O_CREAT | O_TRUNC), /* mandatory for write */ 943 efl_io_file_flags_set(efl_added, O_WRONLY | O_CREAT | O_TRUNC), /* mandatory for write */
944 efl_io_closer_close_on_exec_set(efl_added, EINA_TRUE), /* recommended, set *after* flags, or include O_CLOEXEC in flags -- be careful with _WIN32 that doesn't support it. */ 944 efl_io_closer_close_on_exec_set(efl_added, EINA_TRUE), /* recommended, set *after* flags, or include O_CLOEXEC in flags -- be careful with _WIN32 that doesn't support it. */
diff --git a/src/examples/ecore/efl_io_queue_example.c b/src/examples/ecore/efl_io_queue_example.c
index 9a97388..9367716 100644
--- a/src/examples/ecore/efl_io_queue_example.c
+++ b/src/examples/ecore/efl_io_queue_example.c
@@ -258,7 +258,7 @@ efl_main(void *data EINA_UNUSED,
258 * the line_delimiter, then wait for a reply from the server, then 258 * the line_delimiter, then wait for a reply from the server, then
259 * write another. 259 * write another.
260 */ 260 */
261 send_queue = efl_add(EFL_IO_QUEUE_CLASS, NULL, 261 send_queue = efl_add_ref(EFL_IO_QUEUE_CLASS, NULL,
262 efl_name_set(efl_added, "send_queue"), 262 efl_name_set(efl_added, "send_queue"),
263 efl_io_queue_limit_set(efl_added, buffer_limit)); 263 efl_io_queue_limit_set(efl_added, buffer_limit));
264 if (!send_queue) 264 if (!send_queue)
@@ -279,7 +279,7 @@ efl_main(void *data EINA_UNUSED,
279 * Our example's usage is to peek its data with slice_get() then 279 * Our example's usage is to peek its data with slice_get() then
280 * clear(). 280 * clear().
281 */ 281 */
282 receive_queue = efl_add(EFL_IO_QUEUE_CLASS, NULL, 282 receive_queue = efl_add_ref(EFL_IO_QUEUE_CLASS, NULL,
283 efl_name_set(efl_added, "receive_queue"), 283 efl_name_set(efl_added, "receive_queue"),
284 efl_io_queue_limit_set(efl_added, buffer_limit), 284 efl_io_queue_limit_set(efl_added, buffer_limit),
285 efl_event_callback_add(efl_added, EFL_IO_QUEUE_EVENT_SLICE_CHANGED, _receiver_data, NULL)); 285 efl_event_callback_add(efl_added, EFL_IO_QUEUE_EVENT_SLICE_CHANGED, _receiver_data, NULL));
@@ -359,9 +359,9 @@ efl_main(void *data EINA_UNUSED,
359 error_sender: 359 error_sender:
360 efl_del(dialer); 360 efl_del(dialer);
361 error_dialer: 361 error_dialer:
362 efl_del(receive_queue); 362 efl_unref(receive_queue);
363 error_receive_queue: 363 error_receive_queue:
364 efl_del(send_queue); 364 efl_unref(send_queue);
365 end: 365 end:
366 EINA_LIST_FREE(commands, cmd) 366 EINA_LIST_FREE(commands, cmd)
367 { 367 {
diff --git a/src/examples/ecore/efl_net_server_example.c b/src/examples/ecore/efl_net_server_example.c
index df6e210..6d5aa30 100644
--- a/src/examples/ecore/efl_net_server_example.c
+++ b/src/examples/ecore/efl_net_server_example.c
@@ -350,11 +350,11 @@ _server_client_add(void *data EINA_UNUSED, const Efl_Event *event)
350 return; 350 return;
351 } 351 }
352 352
353 send_buffer = efl_add(EFL_IO_BUFFER_CLASS, NULL, 353 send_buffer = efl_add_ref(EFL_IO_BUFFER_CLASS, NULL,
354 efl_io_buffer_adopt_readonly(efl_added, hello_world_slice)); 354 efl_io_buffer_adopt_readonly(efl_added, hello_world_slice));
355 355
356 /* Unlimited buffer to store the received data. */ 356 /* Unlimited buffer to store the received data. */
357 recv_buffer = efl_add(EFL_IO_BUFFER_CLASS, NULL); 357 recv_buffer = efl_add_ref(EFL_IO_BUFFER_CLASS, NULL);
358 358
359 /* an input copier that takes data from send_buffer and pushes to client */ 359 /* an input copier that takes data from send_buffer and pushes to client */
360 d->send_copier = efl_add(EFL_IO_COPIER_CLASS, efl_parent_get(client), 360 d->send_copier = efl_add(EFL_IO_COPIER_CLASS, efl_parent_get(client),
@@ -712,7 +712,7 @@ efl_main(void *data EINA_UNUSED,
712 cipher = EFL_NET_SSL_CIPHER_TLSV1_2; 712 cipher = EFL_NET_SSL_CIPHER_TLSV1_2;
713 } 713 }
714 714
715 ssl_ctx = efl_add(EFL_NET_SSL_CONTEXT_CLASS, NULL, 715 ssl_ctx = efl_add_ref(EFL_NET_SSL_CONTEXT_CLASS, NULL,
716 efl_net_ssl_context_certificates_set(efl_added, eina_list_iterator_new(certificates)), 716 efl_net_ssl_context_certificates_set(efl_added, eina_list_iterator_new(certificates)),
717 efl_net_ssl_context_private_keys_set(efl_added, eina_list_iterator_new(private_keys)), 717 efl_net_ssl_context_private_keys_set(efl_added, eina_list_iterator_new(private_keys)),
718 efl_net_ssl_context_certificate_revocation_lists_set(efl_added, eina_list_iterator_new(crls)), 718 efl_net_ssl_context_certificate_revocation_lists_set(efl_added, eina_list_iterator_new(crls)),
diff --git a/src/examples/ecore/efl_net_server_simple_example.c b/src/examples/ecore/efl_net_server_simple_example.c
index 93ad6ba..2d21352 100644
--- a/src/examples/ecore/efl_net_server_simple_example.c
+++ b/src/examples/ecore/efl_net_server_simple_example.c
@@ -520,7 +520,7 @@ efl_main(void *data EINA_UNUSED,
520 cipher = EFL_NET_SSL_CIPHER_TLSV1_2; 520 cipher = EFL_NET_SSL_CIPHER_TLSV1_2;
521 } 521 }
522 522
523 ssl_ctx = efl_add(EFL_NET_SSL_CONTEXT_CLASS, NULL, 523 ssl_ctx = efl_add_ref(EFL_NET_SSL_CONTEXT_CLASS, NULL,
524 efl_net_ssl_context_certificates_set(efl_added, eina_list_iterator_new(certificates)), 524 efl_net_ssl_context_certificates_set(efl_added, eina_list_iterator_new(certificates)),
525 efl_net_ssl_context_private_keys_set(efl_added, eina_list_iterator_new(private_keys)), 525 efl_net_ssl_context_private_keys_set(efl_added, eina_list_iterator_new(private_keys)),
526 efl_net_ssl_context_certificate_revocation_lists_set(efl_added, eina_list_iterator_new(crls)), 526 efl_net_ssl_context_certificate_revocation_lists_set(efl_added, eina_list_iterator_new(crls)),
diff --git a/src/examples/ecore/efl_net_socket_ssl_dialer_example.c b/src/examples/ecore/efl_net_socket_ssl_dialer_example.c
index fd22845..75acb0b 100644
--- a/src/examples/ecore/efl_net_socket_ssl_dialer_example.c
+++ b/src/examples/ecore/efl_net_socket_ssl_dialer_example.c
@@ -311,7 +311,7 @@ efl_terminate(void *data EINA_UNUSED,
311 efl_del(dialer); 311 efl_del(dialer);
312 dialer = NULL; 312 dialer = NULL;
313 313
314 efl_del(ssl_ctx); 314 efl_unref(ssl_ctx);
315 ssl_ctx = NULL; 315 ssl_ctx = NULL;
316 316
317 EINA_LIST_FREE(pending_send, str) free(str); 317 EINA_LIST_FREE(pending_send, str) free(str);
@@ -456,7 +456,7 @@ efl_main(void *data EINA_UNUSED,
456 /* create a new SSL context with command line configurations. 456 /* create a new SSL context with command line configurations.
457 * another option would be to use the default dialer context */ 457 * another option would be to use the default dialer context */
458#ifndef USE_DEFAULT_CONTEXT 458#ifndef USE_DEFAULT_CONTEXT
459 ssl_ctx = efl_add(EFL_NET_SSL_CONTEXT_CLASS, NULL, 459 ssl_ctx = efl_add_ref(EFL_NET_SSL_CONTEXT_CLASS, NULL,
460 efl_net_ssl_context_certificates_set(efl_added, eina_list_iterator_new(certificates)), 460 efl_net_ssl_context_certificates_set(efl_added, eina_list_iterator_new(certificates)),
461 efl_net_ssl_context_private_keys_set(efl_added, eina_list_iterator_new(private_keys)), 461 efl_net_ssl_context_private_keys_set(efl_added, eina_list_iterator_new(private_keys)),
462 efl_net_ssl_context_certificate_revocation_lists_set(efl_added, eina_list_iterator_new(crls)), 462 efl_net_ssl_context_certificate_revocation_lists_set(efl_added, eina_list_iterator_new(crls)),
@@ -528,7 +528,7 @@ efl_main(void *data EINA_UNUSED,
528 efl_io_closer_close(dialer); /* just del won't do as ssl has an extra ref */ 528 efl_io_closer_close(dialer); /* just del won't do as ssl has an extra ref */
529 efl_del(dialer); 529 efl_del(dialer);
530 no_ssl_ctx: 530 no_ssl_ctx:
531 efl_del(ssl_ctx); 531 efl_unref(ssl_ctx);
532 532
533 end: 533 end:
534 EINA_LIST_FREE(pending_send, str) free(str); 534 EINA_LIST_FREE(pending_send, str) free(str);
diff --git a/src/examples/ecore/efl_net_socket_ssl_server_example.c b/src/examples/ecore/efl_net_socket_ssl_server_example.c
index f8503c0..1010ca7 100644
--- a/src/examples/ecore/efl_net_socket_ssl_server_example.c
+++ b/src/examples/ecore/efl_net_socket_ssl_server_example.c
@@ -227,7 +227,7 @@ efl_terminate(void *data EINA_UNUSED,
227 efl_del(server); 227 efl_del(server);
228 server = NULL; 228 server = NULL;
229 229
230 efl_del(ssl_ctx); 230 efl_unref(ssl_ctx);
231 ssl_ctx = NULL; 231 ssl_ctx = NULL;
232 232
233 EINA_LIST_FREE(certificates, str) free(str); 233 EINA_LIST_FREE(certificates, str) free(str);
@@ -301,7 +301,7 @@ efl_main(void *data EINA_UNUSED,
301 cipher = EFL_NET_SSL_CIPHER_TLSV1_2; 301 cipher = EFL_NET_SSL_CIPHER_TLSV1_2;
302 } 302 }
303 303
304 ssl_ctx = efl_add(EFL_NET_SSL_CONTEXT_CLASS, NULL, 304 ssl_ctx = efl_add_ref(EFL_NET_SSL_CONTEXT_CLASS, NULL,
305 efl_net_ssl_context_certificates_set(efl_added, eina_list_iterator_new(certificates)), 305 efl_net_ssl_context_certificates_set(efl_added, eina_list_iterator_new(certificates)),
306 efl_net_ssl_context_private_keys_set(efl_added, eina_list_iterator_new(private_keys)), 306 efl_net_ssl_context_private_keys_set(efl_added, eina_list_iterator_new(private_keys)),
307 efl_net_ssl_context_certificate_revocation_lists_set(efl_added, eina_list_iterator_new(crls)), 307 efl_net_ssl_context_certificate_revocation_lists_set(efl_added, eina_list_iterator_new(crls)),
@@ -363,7 +363,7 @@ efl_main(void *data EINA_UNUSED,
363 efl_del(server); 363 efl_del(server);
364 server = NULL; 364 server = NULL;
365 end_ctx: 365 end_ctx:
366 efl_del(ssl_ctx); 366 efl_unref(ssl_ctx);
367 367
368 end: 368 end:
369 EINA_LIST_FREE(certificates, str) free(str); 369 EINA_LIST_FREE(certificates, str) free(str);
diff --git a/src/examples/eio/eio_sentry.c b/src/examples/eio/eio_sentry.c
index 342df05..e604e89 100644
--- a/src/examples/eio/eio_sentry.c
+++ b/src/examples/eio/eio_sentry.c
@@ -27,7 +27,7 @@ void
27monitor_stuff(void *data) 27monitor_stuff(void *data)
28{ 28{
29 const char *path = data; 29 const char *path = data;
30 Eio_Sentry *sentry = efl_add(EIO_SENTRY_CLASS, NULL); 30 Eio_Sentry *sentry = efl_add_ref(EIO_SENTRY_CLASS, NULL);
31 efl_event_callback_add(sentry, EIO_SENTRY_EVENT_FILE_CREATED, (Efl_Event_Cb)&sentry_cb, NULL); 31 efl_event_callback_add(sentry, EIO_SENTRY_EVENT_FILE_CREATED, (Efl_Event_Cb)&sentry_cb, NULL);
32 32
33 printf("Starting monitoring path %s\n", path); 33 printf("Starting monitoring path %s\n", path);
diff --git a/src/examples/elementary/efl_ui_list_example_1.c b/src/examples/elementary/efl_ui_list_example_1.c
index 145861e..eeb2f23 100644
--- a/src/examples/elementary/efl_ui_list_example_1.c
+++ b/src/examples/elementary/efl_ui_list_example_1.c
@@ -49,7 +49,7 @@ _make_model()
49 unsigned int i, s; 49 unsigned int i, s;
50 char buf[256]; 50 char buf[256];
51 51
52 model = efl_add(EFL_MODEL_ITEM_CLASS, NULL); 52 model = efl_add_ref(EFL_MODEL_ITEM_CLASS, NULL);
53 eina_value_setup(&vtext, EINA_VALUE_TYPE_STRING); 53 eina_value_setup(&vtext, EINA_VALUE_TYPE_STRING);
54 54
55 for (i = 0; i < (NUM_ITEMS); i++) 55 for (i = 0; i < (NUM_ITEMS); i++)
diff --git a/src/examples/elementary/efl_ui_list_example_2.c b/src/examples/elementary/efl_ui_list_example_2.c
index 187cee0..9826487 100644
--- a/src/examples/elementary/efl_ui_list_example_2.c
+++ b/src/examples/elementary/efl_ui_list_example_2.c
@@ -43,7 +43,7 @@ elm_main(int argc, char **argv)
43 if (argv[1] != NULL) dirname = argv[1]; 43 if (argv[1] != NULL) dirname = argv[1];
44 else dirname = EFL_MODEL_TEST_FILENAME_PATH; 44 else dirname = EFL_MODEL_TEST_FILENAME_PATH;
45 45
46 model = efl_add(EIO_MODEL_CLASS, NULL, eio_model_path_set(efl_added, dirname)); 46 model = efl_add_ref(EIO_MODEL_CLASS, NULL, eio_model_path_set(efl_added, dirname));
47 factory = efl_add(EFL_UI_LAYOUT_FACTORY_CLASS, win); 47 factory = efl_add(EFL_UI_LAYOUT_FACTORY_CLASS, win);
48 efl_ui_model_connect(factory, "elm.text", "filename"); 48 efl_ui_model_connect(factory, "elm.text", "filename");
49 efl_ui_layout_factory_theme_config(factory, "list", "item", "default"); 49 efl_ui_layout_factory_theme_config(factory, "list", "item", "default");
diff --git a/src/examples/elementary/efl_ui_list_example_3.c b/src/examples/elementary/efl_ui_list_example_3.c
index 32d5b19..0e211e0 100644
--- a/src/examples/elementary/efl_ui_list_example_3.c
+++ b/src/examples/elementary/efl_ui_list_example_3.c
@@ -173,7 +173,7 @@ _make_model()
173 Efl_Model_Item *model, *child; 173 Efl_Model_Item *model, *child;
174 unsigned int i, len; 174 unsigned int i, len;
175 175
176 model = efl_add(EFL_MODEL_ITEM_CLASS, NULL); 176 model = efl_add_ref(EFL_MODEL_ITEM_CLASS, NULL);
177 eina_value_setup(&vtext, EINA_VALUE_TYPE_STRING); 177 eina_value_setup(&vtext, EINA_VALUE_TYPE_STRING);
178 eina_value_setup(&value, EINA_VALUE_TYPE_UCHAR); 178 eina_value_setup(&value, EINA_VALUE_TYPE_UCHAR);
179 179
diff --git a/src/examples/elementary/efl_ui_scroller_example.c b/src/examples/elementary/efl_ui_scroller_example.c
index b09756c..6488633 100644
--- a/src/examples/elementary/efl_ui_scroller_example.c
+++ b/src/examples/elementary/efl_ui_scroller_example.c
@@ -15,7 +15,7 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev)
15 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); 15 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
16 elm_app_info_set(efl_main, "elementary", "images/plant_01.jpg"); 16 elm_app_info_set(efl_main, "elementary", "images/plant_01.jpg");
17 17
18 win = efl_add(EFL_UI_WIN_CLASS, NULL, "TEST", ELM_WIN_BASIC, 18 win = efl_add_ref(EFL_UI_WIN_CLASS, NULL, "TEST", ELM_WIN_BASIC,
19 efl_ui_win_autodel_set(efl_added, EINA_TRUE)); 19 efl_ui_win_autodel_set(efl_added, EINA_TRUE));
20 efl_gfx_size_set(win, EINA_SIZE2D(300, 400)); 20 efl_gfx_size_set(win, EINA_SIZE2D(300, 400));
21 21
diff --git a/src/examples/elementary/filemvc.c b/src/examples/elementary/filemvc.c
index f09657b..657148c 100644
--- a/src/examples/elementary/filemvc.c
+++ b/src/examples/elementary/filemvc.c
@@ -67,7 +67,7 @@ _promise_then(void *data, const Efl_Event *event)
67 Eina_Value* value = info->value; 67 Eina_Value* value = info->value;
68 68
69 eina_value_get(value, &path); 69 eina_value_get(value, &path);
70 model = efl_add(EIO_MODEL_CLASS, NULL, eio_model_path_set(efl_added, path)); 70 model = efl_add_ref(EIO_MODEL_CLASS, NULL, eio_model_path_set(efl_added, path));
71 elm_view_list_model_set(priv->fileview, model); 71 elm_view_list_model_set(priv->fileview, model);
72} 72}
73 73
@@ -150,12 +150,12 @@ elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
150 else dirname = EFL_MODEL_TEST_FILENAME_PATH; 150 else dirname = EFL_MODEL_TEST_FILENAME_PATH;
151 151
152 //treemodel 152 //treemodel
153 priv.treemodel = efl_add(EIO_MODEL_CLASS, NULL, eio_model_path_set(efl_added, dirname)); 153 priv.treemodel = efl_add_ref(EIO_MODEL_CLASS, NULL, eio_model_path_set(efl_added, dirname));
154 eio_model_children_filter_set(priv.treemodel, _filter_cb, NULL); 154 eio_model_children_filter_set(priv.treemodel, _filter_cb, NULL);
155 155
156 //treeview 156 //treeview
157 genlist = elm_genlist_add(win); 157 genlist = elm_genlist_add(win);
158 priv.treeview = efl_add(ELM_VIEW_LIST_CLASS, NULL, elm_view_list_genlist_set(efl_added, genlist, ELM_GENLIST_ITEM_TREE, NULL)); 158 priv.treeview = efl_add_ref(ELM_VIEW_LIST_CLASS, NULL, elm_view_list_genlist_set(efl_added, genlist, ELM_GENLIST_ITEM_TREE, NULL));
159 elm_view_list_property_connect(priv.treeview, "filename", "elm.text"); 159 elm_view_list_property_connect(priv.treeview, "filename", "elm.text");
160 elm_view_list_property_connect(priv.treeview, "icon", "elm.swallow.icon"); 160 elm_view_list_property_connect(priv.treeview, "icon", "elm.swallow.icon");
161 elm_view_list_model_set(priv.treeview, priv.treemodel); 161 elm_view_list_model_set(priv.treeview, priv.treemodel);
@@ -170,7 +170,7 @@ elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
170 170
171 //listview 171 //listview
172 genlist = elm_genlist_add(win); 172 genlist = elm_genlist_add(win);
173 priv.fileview = efl_add(ELM_VIEW_LIST_CLASS, NULL, elm_view_list_genlist_set(efl_added, genlist, ELM_GENLIST_ITEM_NONE, "double_label")); 173 priv.fileview = efl_add_ref(ELM_VIEW_LIST_CLASS, NULL, elm_view_list_genlist_set(efl_added, genlist, ELM_GENLIST_ITEM_NONE, "double_label"));
174 elm_view_list_property_connect(priv.fileview, "filename", "elm.text"); 174 elm_view_list_property_connect(priv.fileview, "filename", "elm.text");
175 elm_view_list_property_connect(priv.fileview, "mime_type", "elm.text.sub"); 175 elm_view_list_property_connect(priv.fileview, "mime_type", "elm.text.sub");
176 176
@@ -184,7 +184,7 @@ elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
184 bxr = elm_box_add(win); 184 bxr = elm_box_add(win);
185 _widget_init(bxr); 185 _widget_init(bxr);
186 elm_object_part_content_set(vpanes, "right", bxr); 186 elm_object_part_content_set(vpanes, "right", bxr);
187 priv.formview = efl_add(ELM_VIEW_FORM_CLASS, NULL); 187 priv.formview = efl_add_ref(ELM_VIEW_FORM_CLASS, NULL);
188 188
189 /*Label widget */ 189 /*Label widget */
190 elm_view_form_widget_add(priv.formview, "filename", _label_init(win, bxr, "File Name")); 190 elm_view_form_widget_add(priv.formview, "filename", _label_init(win, bxr, "File Name"));
diff --git a/src/examples/elementary/fileviewlist.c b/src/examples/elementary/fileviewlist.c
index af14785..39df4f8 100644
--- a/src/examples/elementary/fileviewlist.c
+++ b/src/examples/elementary/fileviewlist.c
@@ -54,8 +54,8 @@ elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
54 evas_object_size_hint_weight_set(genlist, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 54 evas_object_size_hint_weight_set(genlist, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
55 evas_object_show(genlist); 55 evas_object_show(genlist);
56 56
57 priv.filemodel = efl_add(EIO_MODEL_CLASS, NULL, eio_model_path_set(efl_added, dirname)); 57 priv.filemodel = efl_add_ref(EIO_MODEL_CLASS, NULL, eio_model_path_set(efl_added, dirname));
58 priv.fileview = efl_add(ELM_VIEW_LIST_CLASS, NULL, elm_view_list_genlist_set(efl_added, genlist, ELM_GENLIST_ITEM_TREE, "double_label")); 58 priv.fileview = efl_add_ref(ELM_VIEW_LIST_CLASS, NULL, elm_view_list_genlist_set(efl_added, genlist, ELM_GENLIST_ITEM_TREE, "double_label"));
59 elm_view_list_model_set(priv.fileview, priv.filemodel); 59 elm_view_list_model_set(priv.fileview, priv.filemodel);
60 evas_object_event_callback_add(win, EVAS_CALLBACK_DEL, _cleanup_cb, &priv); 60 evas_object_event_callback_add(win, EVAS_CALLBACK_DEL, _cleanup_cb, &priv);
61 61
diff --git a/src/examples/elementary/layout_model_connect.c b/src/examples/elementary/layout_model_connect.c
index 5c6660e..e93b344 100644
--- a/src/examples/elementary/layout_model_connect.c
+++ b/src/examples/elementary/layout_model_connect.c
@@ -111,10 +111,10 @@ elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
111 if (argv[1] != NULL) dirname = argv[1]; 111 if (argv[1] != NULL) dirname = argv[1];
112 else dirname = EFL_MODEL_TEST_FILENAME_PATH; 112 else dirname = EFL_MODEL_TEST_FILENAME_PATH;
113 113
114 priv->model = efl_add(EIO_MODEL_CLASS, NULL, eio_model_path_set(efl_added, dirname)); 114 priv->model = efl_add_ref(EIO_MODEL_CLASS, NULL, eio_model_path_set(efl_added, dirname));
115 115
116 genlist = elm_genlist_add(win); 116 genlist = elm_genlist_add(win);
117 priv->fileview = efl_add(ELM_VIEW_LIST_CLASS, NULL, elm_view_list_genlist_set(efl_added, genlist, ELM_GENLIST_ITEM_NONE, NULL)); 117 priv->fileview = efl_add_ref(ELM_VIEW_LIST_CLASS, NULL, elm_view_list_genlist_set(efl_added, genlist, ELM_GENLIST_ITEM_NONE, NULL));
118 elm_view_list_property_connect(priv->fileview, "filename", "elm.text"); 118 elm_view_list_property_connect(priv->fileview, "filename", "elm.text");
119 elm_view_list_model_set(priv->fileview, priv->model); 119 elm_view_list_model_set(priv->fileview, priv->model);
120 _widget_init(genlist); 120 _widget_init(genlist);
diff --git a/src/lib/ecore/efl_model_composite_boolean.c b/src/lib/ecore/efl_model_composite_boolean.c
index d8c8e38..bd6c5cf 100644
--- a/src/lib/ecore/efl_model_composite_boolean.c
+++ b/src/lib/ecore/efl_model_composite_boolean.c
@@ -313,7 +313,7 @@ efl_model_acessor_slice_get_at(Efl_Model_Accessor_Slice *acc, unsigned int idx,
313 if (child) 313 if (child)
314 { 314 {
315 Efl_Model_Composite_Boolean_Children_Data *cpd; 315 Efl_Model_Composite_Boolean_Children_Data *cpd;
316 child_bool = efl_add(EFL_MODEL_COMPOSITE_BOOLEAN_CHILDREN_CLASS, NULL); 316 child_bool = efl_add_ref(EFL_MODEL_COMPOSITE_BOOLEAN_CHILDREN_CLASS, NULL);
317 cpd = efl_data_scope_get(child_bool, EFL_MODEL_COMPOSITE_BOOLEAN_CHILDREN_CLASS); 317 cpd = efl_data_scope_get(child_bool, EFL_MODEL_COMPOSITE_BOOLEAN_CHILDREN_CLASS);
318 318
319 cpd->parent_pd = acc->parent_pd; 319 cpd->parent_pd = acc->parent_pd;
diff --git a/src/lib/ecore/efl_model_composite_selection.c b/src/lib/ecore/efl_model_composite_selection.c
index dbbe43f..68d4749 100644
--- a/src/lib/ecore/efl_model_composite_selection.c
+++ b/src/lib/ecore/efl_model_composite_selection.c
@@ -201,7 +201,7 @@ _efl_model_composite_selection_children_efl_model_property_set(Eo *obj EINA_UNUS
201static Eo* _construct_children(void* pdata, Eo* child) 201static Eo* _construct_children(void* pdata, Eo* child)
202{ 202{
203 Efl_Model_Composite_Selection_Data* pd = pdata; 203 Efl_Model_Composite_Selection_Data* pd = pdata;
204 Eo* new_child = efl_add(EFL_MODEL_COMPOSITE_SELECTION_CHILDREN_CLASS, NULL); 204 Eo* new_child = efl_add_ref(EFL_MODEL_COMPOSITE_SELECTION_CHILDREN_CLASS, NULL);
205 Efl_Model_Composite_Selection_Children_Data* data = efl_data_scope_get 205 Efl_Model_Composite_Selection_Children_Data* data = efl_data_scope_get
206 (new_child, EFL_MODEL_COMPOSITE_SELECTION_CHILDREN_CLASS); 206 (new_child, EFL_MODEL_COMPOSITE_SELECTION_CHILDREN_CLASS);
207 data->pd = pd; 207 data->pd = pd;
diff --git a/src/lib/ecore/efl_thread.c b/src/lib/ecore/efl_thread.c
index 048a75e..91e7ddb 100644
--- a/src/lib/ecore/efl_thread.c
+++ b/src/lib/ecore/efl_thread.c
@@ -229,7 +229,7 @@ _efl_thread_main(void *data, Eina_Thread t)
229 if (thdat->name) eina_thread_name_set(t, thdat->name); 229 if (thdat->name) eina_thread_name_set(t, thdat->name);
230 else eina_thread_name_set(t, "Eflthread"); 230 else eina_thread_name_set(t, "Eflthread");
231 231
232 obj = efl_add(APPTHREAD_CLASS, NULL); 232 obj = efl_add_ref(APPTHREAD_CLASS, NULL);
233 ad = efl_data_scope_get(obj, APPTHREAD_CLASS); 233 ad = efl_data_scope_get(obj, APPTHREAD_CLASS);
234 efl_threadio_indata_set(obj, thdat->indata); 234 efl_threadio_indata_set(obj, thdat->indata);
235 efl_threadio_outdata_set(obj, thdat->outdata); 235 efl_threadio_outdata_set(obj, thdat->outdata);
@@ -294,7 +294,7 @@ _efl_thread_main(void *data, Eina_Thread t)
294 cmd.d.data = real; 294 cmd.d.data = real;
295 write(thdat->ctrl.in, &cmd, sizeof(Control_Data)); 295 write(thdat->ctrl.in, &cmd, sizeof(Control_Data));
296 296
297 efl_del(obj); 297 efl_unref(obj);
298 298
299 thdat->fd.in_handler = NULL; 299 thdat->fd.in_handler = NULL;
300 thdat->fd.out_handler = NULL; 300 thdat->fd.out_handler = NULL;
diff --git a/src/lib/ecore_con/ecore_con_eet.c b/src/lib/ecore_con/ecore_con_eet.c
index f724aa8..134d691 100644
--- a/src/lib/ecore_con/ecore_con_eet.c
+++ b/src/lib/ecore_con/ecore_con_eet.c
@@ -725,7 +725,7 @@ ecore_con_eet_server_new(Ecore_Con_Server *server)
725 725
726 if (!server) return NULL; 726 if (!server) return NULL;
727 727
728 ece_obj = efl_add(ECORE_CON_EET_SERVER_OBJ_CLASS, NULL, ecore_con_eet_base_server_set(efl_added, server)); 728 ece_obj = efl_add_ref(ECORE_CON_EET_SERVER_OBJ_CLASS, NULL, ecore_con_eet_base_server_set(efl_added, server));
729 729
730 return ece_obj; 730 return ece_obj;
731} 731}
@@ -737,7 +737,7 @@ ecore_con_eet_client_new(Ecore_Con_Server *server)
737 737
738 if (!server) return NULL; 738 if (!server) return NULL;
739 739
740 ece_obj = efl_add(ECORE_CON_EET_CLIENT_OBJ_CLASS, NULL, ecore_con_eet_base_server_set(efl_added, server)); 740 ece_obj = efl_add_ref(ECORE_CON_EET_CLIENT_OBJ_CLASS, NULL, ecore_con_eet_base_server_set(efl_added, server));
741 741
742 return ece_obj; 742 return ece_obj;
743} 743}
@@ -745,7 +745,7 @@ ecore_con_eet_client_new(Ecore_Con_Server *server)
745EAPI void 745EAPI void
746ecore_con_eet_server_free(Ecore_Con_Eet *server) 746ecore_con_eet_server_free(Ecore_Con_Eet *server)
747{ 747{
748 efl_del(server); 748 efl_unref(server);
749} 749}
750 750
751EAPI void 751EAPI void
diff --git a/src/lib/ecore_con/ecore_con_legacy.c b/src/lib/ecore_con/ecore_con_legacy.c
index ea8c31f..ecdb187 100644
--- a/src/lib/ecore_con/ecore_con_legacy.c
+++ b/src/lib/ecore_con/ecore_con_legacy.c
@@ -1590,7 +1590,7 @@ _ecore_con_server_ssl_ctx_create(const Ecore_Con_Server *svr)
1590 1590
1591 /* legacy compatibility: server never verified peer, only dialer did */ 1591 /* legacy compatibility: server never verified peer, only dialer did */
1592 1592
1593 return efl_add(EFL_NET_SSL_CONTEXT_CLASS, NULL, 1593 return efl_add_ref(EFL_NET_SSL_CONTEXT_CLASS, NULL,
1594 efl_net_ssl_context_certificates_set(efl_added, eina_list_iterator_new(svr->ssl.certs)), 1594 efl_net_ssl_context_certificates_set(efl_added, eina_list_iterator_new(svr->ssl.certs)),
1595 efl_net_ssl_context_private_keys_set(efl_added, eina_list_iterator_new(svr->ssl.privkeys)), 1595 efl_net_ssl_context_private_keys_set(efl_added, eina_list_iterator_new(svr->ssl.privkeys)),
1596 efl_net_ssl_context_certificate_revocation_lists_set(efl_added, eina_list_iterator_new(svr->ssl.crls)), 1596 efl_net_ssl_context_certificate_revocation_lists_set(efl_added, eina_list_iterator_new(svr->ssl.crls)),
@@ -1645,7 +1645,7 @@ _ecore_con_server_server_ssl_job(void *data, const Eina_Value v,
1645 error_server: 1645 error_server:
1646 efl_del(inner_server); 1646 efl_del(inner_server);
1647 error_inner_server: 1647 error_inner_server:
1648 efl_del(ssl_ctx); 1648 efl_unref(ssl_ctx);
1649 error_ssl_ctx: 1649 error_ssl_ctx:
1650 if (_ecore_con_post_event_server_error(svr, "Couldn't finish SSL setup")) 1650 if (_ecore_con_post_event_server_error(svr, "Couldn't finish SSL setup"))
1651 _ecore_con_post_event_server_del(svr); 1651 _ecore_con_post_event_server_del(svr);
@@ -1969,7 +1969,7 @@ _ecore_con_server_dialer_ssl_job(void *data, const Eina_Value v,
1969 if (svr->ssl.verify) 1969 if (svr->ssl.verify)
1970 verify_mode = EFL_NET_SSL_VERIFY_MODE_REQUIRED; 1970 verify_mode = EFL_NET_SSL_VERIFY_MODE_REQUIRED;
1971 1971
1972 ssl_ctx = efl_add(EFL_NET_SSL_CONTEXT_CLASS, NULL, 1972 ssl_ctx = efl_add_ref(EFL_NET_SSL_CONTEXT_CLASS, NULL,
1973 efl_net_ssl_context_certificates_set(efl_added, eina_list_iterator_new(svr->ssl.certs)), 1973 efl_net_ssl_context_certificates_set(efl_added, eina_list_iterator_new(svr->ssl.certs)),
1974 efl_net_ssl_context_private_keys_set(efl_added, eina_list_iterator_new(svr->ssl.privkeys)), 1974 efl_net_ssl_context_private_keys_set(efl_added, eina_list_iterator_new(svr->ssl.privkeys)),
1975 efl_net_ssl_context_certificate_revocation_lists_set(efl_added, eina_list_iterator_new(svr->ssl.crls)), 1975 efl_net_ssl_context_certificate_revocation_lists_set(efl_added, eina_list_iterator_new(svr->ssl.crls)),
@@ -2024,7 +2024,7 @@ _ecore_con_server_dialer_ssl_job(void *data, const Eina_Value v,
2024 error_dialer: 2024 error_dialer:
2025 efl_del(inner_dialer); 2025 efl_del(inner_dialer);
2026 error_inner_dialer: 2026 error_inner_dialer:
2027 efl_del(ssl_ctx); 2027 efl_unref(ssl_ctx);
2028 error_ssl_ctx: 2028 error_ssl_ctx:
2029 if (_ecore_con_post_event_server_error(svr, "Couldn't finish SSL setup")) 2029 if (_ecore_con_post_event_server_error(svr, "Couldn't finish SSL setup"))
2030 _ecore_con_post_event_server_del(svr); 2030 _ecore_con_post_event_server_del(svr);
@@ -2063,7 +2063,7 @@ _ecore_con_server_dialer_ssl_upgrade_job(void *data, const Eina_Value v,
2063 if (svr->ssl.verify) 2063 if (svr->ssl.verify)
2064 verify_mode = EFL_NET_SSL_VERIFY_MODE_REQUIRED; 2064 verify_mode = EFL_NET_SSL_VERIFY_MODE_REQUIRED;
2065 2065
2066 ssl_ctx = efl_add(EFL_NET_SSL_CONTEXT_CLASS, NULL, 2066 ssl_ctx = efl_add_ref(EFL_NET_SSL_CONTEXT_CLASS, NULL,
2067 efl_net_ssl_context_certificates_set(efl_added, eina_list_iterator_new(svr->ssl.certs)), 2067 efl_net_ssl_context_certificates_set(efl_added, eina_list_iterator_new(svr->ssl.certs)),
2068 efl_net_ssl_context_private_keys_set(efl_added, eina_list_iterator_new(svr->ssl.privkeys)), 2068 efl_net_ssl_context_private_keys_set(efl_added, eina_list_iterator_new(svr->ssl.privkeys)),
2069 efl_net_ssl_context_certificate_revocation_lists_set(efl_added, eina_list_iterator_new(svr->ssl.crls)), 2069 efl_net_ssl_context_certificate_revocation_lists_set(efl_added, eina_list_iterator_new(svr->ssl.crls)),
@@ -2110,7 +2110,7 @@ _ecore_con_server_dialer_ssl_upgrade_job(void *data, const Eina_Value v,
2110 efl_del(inner_dialer); 2110 efl_del(inner_dialer);
2111 error_inner_dialer: 2111 error_inner_dialer:
2112 svr->dialer = tcp_dialer; /* put it back */ 2112 svr->dialer = tcp_dialer; /* put it back */
2113 efl_del(ssl_ctx); 2113 efl_unref(ssl_ctx);
2114 error_ssl_ctx: 2114 error_ssl_ctx:
2115 if (_ecore_con_post_event_server_error(svr, "Couldn't finish SSL setup")) 2115 if (_ecore_con_post_event_server_error(svr, "Couldn't finish SSL setup"))
2116 _ecore_con_post_event_server_del(svr); 2116 _ecore_con_post_event_server_del(svr);
diff --git a/src/lib/ecore_con/ecore_con_local_win32.c b/src/lib/ecore_con/ecore_con_local_win32.c
index 126ccda..fb43f94 100644
--- a/src/lib/ecore_con/ecore_con_local_win32.c
+++ b/src/lib/ecore_con/ecore_con_local_win32.c
@@ -262,7 +262,7 @@ _ecore_con_local_win32_client_add(void *data, Ecore_Win32_Handler *wh)
262 (svr->client_count >= (unsigned int)svr->client_limit)) 262 (svr->client_count >= (unsigned int)svr->client_limit))
263 return ECORE_CALLBACK_CANCEL; 263 return ECORE_CALLBACK_CANCEL;
264 264
265 Ecore_Con_Client *cl_obj = efl_add(EFL_NETWORK_CLIENT_CLASS, NULL); 265 Ecore_Con_Client *cl_obj = efl_add_ref(EFL_NETWORK_CLIENT_CLASS, NULL);
266 Efl_Network_Client_Data *cl = efl_data_scope_get(obj, EFL_NETWORK_CLIENT_CLASS); 266 Efl_Network_Client_Data *cl = efl_data_scope_get(obj, EFL_NETWORK_CLIENT_CLASS);
267 if (!cl) 267 if (!cl)
268 { 268 {
@@ -332,7 +332,7 @@ del_handler_read:
332close_event_read: 332close_event_read:
333 CloseHandle(svr->event_read); 333 CloseHandle(svr->event_read);
334free_cl: 334free_cl:
335 efl_del(cl_obj); 335 efl_unref(cl_obj);
336 336
337 return ECORE_CALLBACK_CANCEL; 337 return ECORE_CALLBACK_CANCEL;
338} 338}
diff --git a/src/lib/ecore_con/efl_net_ip_address.c b/src/lib/ecore_con/efl_net_ip_address.c
index 13e14a0..34cf4ef 100644
--- a/src/lib/ecore_con/efl_net_ip_address.c
+++ b/src/lib/ecore_con/efl_net_ip_address.c
@@ -300,7 +300,7 @@ _efl_net_ip_address_create(Eo *cls, void *pd EINA_UNUSED, uint16_t port, const E
300 else 300 else
301 family = AF_INET; 301 family = AF_INET;
302 302
303 return efl_add(cls, NULL, 303 return efl_add_ref(cls, NULL,
304 efl_net_ip_address_family_set(efl_added, family), 304 efl_net_ip_address_family_set(efl_added, family),
305 efl_net_ip_address_port_set(efl_added, port), 305 efl_net_ip_address_port_set(efl_added, port),
306 efl_net_ip_address_set(efl_added, address)); 306 efl_net_ip_address_set(efl_added, address));
@@ -314,7 +314,7 @@ _efl_net_ip_address_create_sockaddr(Eo *cls, void *pd EINA_UNUSED, const void *p
314 EINA_SAFETY_ON_NULL_RETURN_VAL(sockaddr, NULL); 314 EINA_SAFETY_ON_NULL_RETURN_VAL(sockaddr, NULL);
315 EINA_SAFETY_ON_TRUE_RETURN_VAL((sockaddr->sa_family != AF_INET) && (sockaddr->sa_family != AF_INET6), NULL); 315 EINA_SAFETY_ON_TRUE_RETURN_VAL((sockaddr->sa_family != AF_INET) && (sockaddr->sa_family != AF_INET6), NULL);
316 316
317 return efl_add(cls, NULL, 317 return efl_add_ref(cls, NULL,
318 efl_net_ip_address_sockaddr_set(efl_added, sockaddr)); 318 efl_net_ip_address_sockaddr_set(efl_added, sockaddr));
319} 319}
320 320
@@ -357,7 +357,7 @@ _efl_net_ip_address_parse(Eo *cls, void *pd EINA_UNUSED, const char *numeric_add
357 return NULL; 357 return NULL;
358 } 358 }
359 359
360 return efl_add(cls, NULL, 360 return efl_add_ref(cls, NULL,
361 efl_net_ip_address_sockaddr_set(efl_added, &ss)); 361 efl_net_ip_address_sockaddr_set(efl_added, &ss));
362} 362}
363 363
@@ -498,7 +498,7 @@ _efl_net_ip_address_resolve_done(void *data, const char *host, const char *port,
498 if (o) 498 if (o)
499 { 499 {
500 if (!eina_array_push(r->results, o)) 500 if (!eina_array_push(r->results, o))
501 efl_del(o); 501 efl_unref(o);
502 } 502 }
503 } 503 }
504 freeaddrinfo(result); 504 freeaddrinfo(result);
diff --git a/src/lib/ecore_con/efl_net_ssl_context.c b/src/lib/ecore_con/efl_net_ssl_context.c
index df20f47..0c350d3 100644
--- a/src/lib/ecore_con/efl_net_ssl_context.c
+++ b/src/lib/ecore_con/efl_net_ssl_context.c
@@ -361,7 +361,7 @@ _efl_net_ssl_context_default_dialer_get(Efl_Class *klass, void *pd EINA_UNUSED)
361{ 361{
362 if (!_efl_net_ssl_context_default_dialer) 362 if (!_efl_net_ssl_context_default_dialer)
363 { 363 {
364 _efl_net_ssl_context_default_dialer = efl_add(klass, NULL, 364 _efl_net_ssl_context_default_dialer = efl_add_ref(klass, NULL,
365 efl_net_ssl_context_verify_mode_set(efl_added, EFL_NET_SSL_VERIFY_MODE_REQUIRED), 365 efl_net_ssl_context_verify_mode_set(efl_added, EFL_NET_SSL_VERIFY_MODE_REQUIRED),
366 efl_net_ssl_context_hostname_verify_set(efl_added, EINA_TRUE), 366 efl_net_ssl_context_hostname_verify_set(efl_added, EINA_TRUE),
367 efl_net_ssl_context_default_paths_load_set(efl_added, EINA_TRUE), 367 efl_net_ssl_context_default_paths_load_set(efl_added, EINA_TRUE),
diff --git a/src/lib/ector/cairo/ector_cairo_surface.c b/src/lib/ector/cairo/ector_cairo_surface.c
index b21f7ab..3bc1d4f 100644
--- a/src/lib/ector/cairo/ector_cairo_surface.c
+++ b/src/lib/ector/cairo/ector_cairo_surface.c
@@ -63,11 +63,11 @@ _ector_cairo_surface_ector_surface_renderer_factory_new(Eo *obj,
63 const Efl_Class *type) 63 const Efl_Class *type)
64{ 64{
65 if (type == ECTOR_RENDERER_SHAPE_MIXIN) 65 if (type == ECTOR_RENDERER_SHAPE_MIXIN)
66 return efl_add(ECTOR_RENDERER_CAIRO_SHAPE_CLASS, NULL, ector_renderer_surface_set(efl_added, obj)); 66 return efl_add_ref(ECTOR_RENDERER_CAIRO_SHAPE_CLASS, NULL, ector_renderer_surface_set(efl_added, obj));
67 else if (type == ECTOR_RENDERER_GRADIENT_LINEAR_MIXIN) 67 else if (type == ECTOR_RENDERER_GRADIENT_LINEAR_MIXIN)
68 return efl_add(ECTOR_RENDERER_CAIRO_GRADIENT_LINEAR_CLASS, NULL, ector_renderer_surface_set(efl_added, obj)); 68 return efl_add_ref(ECTOR_RENDERER_CAIRO_GRADIENT_LINEAR_CLASS, NULL, ector_renderer_surface_set(efl_added, obj));
69 else if (type == ECTOR_RENDERER_GRADIENT_RADIAL_MIXIN) 69 else if (type == ECTOR_RENDERER_GRADIENT_RADIAL_MIXIN)
70 return efl_add(ECTOR_RENDERER_CAIRO_GRADIENT_RADIAL_CLASS, NULL, ector_renderer_surface_set(efl_added, obj)); 70 return efl_add_ref(ECTOR_RENDERER_CAIRO_GRADIENT_RADIAL_CLASS, NULL, ector_renderer_surface_set(efl_added, obj));
71 71
72 ERR("Couldn't find class for type: %s\n", efl_class_name_get(type)); 72 ERR("Couldn't find class for type: %s\n", efl_class_name_get(type));
73 return NULL; 73 return NULL;
diff --git a/src/lib/ector/gl/ector_gl_surface.c b/src/lib/ector/gl/ector_gl_surface.c
index 60fba18..2f144e8 100644
--- a/src/lib/ector/gl/ector_gl_surface.c
+++ b/src/lib/ector/gl/ector_gl_surface.c
@@ -45,11 +45,11 @@ _ector_gl_surface_ector_surface_renderer_factory_new(Eo *obj,
45 const Efl_Class *type) 45 const Efl_Class *type)
46{ 46{
47 if (type == ECTOR_RENDERER_SHAPE_MIXIN) 47 if (type == ECTOR_RENDERER_SHAPE_MIXIN)
48 return efl_add(ECTOR_RENDERER_GL_SHAPE_CLASS, NULL, ector_renderer_surface_set(efl_added, obj)); 48 return efl_add_ref(ECTOR_RENDERER_GL_SHAPE_CLASS, NULL, ector_renderer_surface_set(efl_added, obj));
49 else if (type == ECTOR_RENDERER_GRADIENT_LINEAR_MIXIN) 49 else if (type == ECTOR_RENDERER_GRADIENT_LINEAR_MIXIN)
50 return efl_add(ECTOR_RENDERER_GL_GRADIENT_LINEAR_CLASS, NULL, ector_renderer_surface_set(efl_added, obj)); 50 return efl_add_ref(ECTOR_RENDERER_GL_GRADIENT_LINEAR_CLASS, NULL, ector_renderer_surface_set(efl_added, obj));
51 else if (type == ECTOR_RENDERER_GRADIENT_RADIAL_MIXIN) 51 else if (type == ECTOR_RENDERER_GRADIENT_RADIAL_MIXIN)
52 return efl_add(ECTOR_RENDERER_GL_GRADIENT_RADIAL_CLASS, NULL, ector_renderer_surface_set(efl_added, obj)); 52 return efl_add_ref(ECTOR_RENDERER_GL_GRADIENT_RADIAL_CLASS, NULL, ector_renderer_surface_set(efl_added, obj));
53 53
54 ERR("Couldn't find class for type: %s\n", efl_class_name_get(type)); 54 ERR("Couldn't find class for type: %s\n", efl_class_name_get(type));
55 return NULL; 55 return NULL;
diff --git a/src/lib/ector/software/ector_software_surface.c b/src/lib/ector/software/ector_software_surface.c
index e3e72fb..2907272 100644
--- a/src/lib/ector/software/ector_software_surface.c
+++ b/src/lib/ector/software/ector_software_surface.c
@@ -201,11 +201,11 @@ _ector_software_surface_ector_surface_renderer_factory_new(Eo *obj,
201 const Efl_Class *type) 201 const Efl_Class *type)
202{ 202{
203 if (type == ECTOR_RENDERER_SHAPE_MIXIN) 203 if (type == ECTOR_RENDERER_SHAPE_MIXIN)
204 return efl_add(ECTOR_RENDERER_SOFTWARE_SHAPE_CLASS, NULL, ector_renderer_surface_set(efl_added, obj)); 204 return efl_add_ref(ECTOR_RENDERER_SOFTWARE_SHAPE_CLASS, NULL, ector_renderer_surface_set(efl_added, obj));
205 else if (type == ECTOR_RENDERER_GRADIENT_LINEAR_MIXIN) 205 else if (type == ECTOR_RENDERER_GRADIENT_LINEAR_MIXIN)
206 return efl_add(ECTOR_RENDERER_SOFTWARE_GRADIENT_LINEAR_CLASS, NULL, ector_renderer_surface_set(efl_added, obj)); 206 return efl_add_ref(ECTOR_RENDERER_SOFTWARE_GRADIENT_LINEAR_CLASS, NULL, ector_renderer_surface_set(efl_added, obj));
207 else if (type == ECTOR_RENDERER_GRADIENT_RADIAL_MIXIN) 207 else if (type == ECTOR_RENDERER_GRADIENT_RADIAL_MIXIN)
208 return efl_add(ECTOR_RENDERER_SOFTWARE_GRADIENT_RADIAL_CLASS, NULL, ector_renderer_surface_set(efl_added, obj)); 208 return efl_add_ref(ECTOR_RENDERER_SOFTWARE_GRADIENT_RADIAL_CLASS, NULL, ector_renderer_surface_set(efl_added, obj));
209 209
210 ERR("Couldn't find class for type: %s", efl_class_name_get(type)); 210 ERR("Couldn't find class for type: %s", efl_class_name_get(type));
211 return NULL; 211 return NULL;
diff --git a/src/lib/edje/edje_main.c b/src/lib/edje/edje_main.c
index bd49820..338fb66 100644
--- a/src/lib/edje/edje_main.c
+++ b/src/lib/edje/edje_main.c
@@ -153,7 +153,7 @@ shutdown_all:
153 efl_loop_unregister(efl_main_loop_get(), EFL_GFX_COLOR_CLASS_INTERFACE, _edje_global_obj); 153 efl_loop_unregister(efl_main_loop_get(), EFL_GFX_COLOR_CLASS_INTERFACE, _edje_global_obj);
154 efl_loop_unregister(efl_main_loop_get(), EFL_GFX_TEXT_CLASS_INTERFACE, _edje_global_obj); 154 efl_loop_unregister(efl_main_loop_get(), EFL_GFX_TEXT_CLASS_INTERFACE, _edje_global_obj);
155 efl_loop_unregister(efl_main_loop_get(), EFL_GFX_SIZE_CLASS_INTERFACE, _edje_global_obj); 155 efl_loop_unregister(efl_main_loop_get(), EFL_GFX_SIZE_CLASS_INTERFACE, _edje_global_obj);
156 efl_del(_edje_global_obj); 156 efl_unref(_edje_global_obj);
157 _edje_global_obj = NULL; 157 _edje_global_obj = NULL;
158 } 158 }
159shutdown_efreet: 159shutdown_efreet:
@@ -212,7 +212,7 @@ _edje_shutdown_core(void)
212 efl_loop_unregister(efl_main_loop_get(), EFL_GFX_COLOR_CLASS_INTERFACE, _edje_global_obj); 212 efl_loop_unregister(efl_main_loop_get(), EFL_GFX_COLOR_CLASS_INTERFACE, _edje_global_obj);
213 efl_loop_unregister(efl_main_loop_get(), EFL_GFX_TEXT_CLASS_INTERFACE, _edje_global_obj); 213 efl_loop_unregister(efl_main_loop_get(), EFL_GFX_TEXT_CLASS_INTERFACE, _edje_global_obj);
214 efl_loop_unregister(efl_main_loop_get(), EFL_GFX_SIZE_CLASS_INTERFACE, _edje_global_obj); 214 efl_loop_unregister(efl_main_loop_get(), EFL_GFX_SIZE_CLASS_INTERFACE, _edje_global_obj);
215 efl_del(_edje_global_obj); 215 efl_unref(_edje_global_obj);
216 _edje_global_obj = NULL; 216 _edje_global_obj = NULL;
217 217
218 eina_cow_del(_edje_calc_params_map_cow); 218 eina_cow_del(_edje_calc_params_map_cow);
@@ -286,17 +286,17 @@ _edje_class_shutdown(void)
286{ 286{
287 if (_edje_color_class_member) 287 if (_edje_color_class_member)
288 { 288 {
289 efl_del(_edje_color_class_member); 289 efl_unref(_edje_color_class_member);
290 _edje_color_class_member = NULL; 290 _edje_color_class_member = NULL;
291 } 291 }
292 if (_edje_text_class_member) 292 if (_edje_text_class_member)
293 { 293 {
294 efl_del(_edje_text_class_member); 294 efl_unref(_edje_text_class_member);
295 _edje_text_class_member = NULL; 295 _edje_text_class_member = NULL;
296 } 296 }
297 if (_edje_size_class_member) 297 if (_edje_size_class_member)
298 { 298 {
299 efl_del(_edje_size_class_member); 299 efl_unref(_edje_size_class_member);
300 _edje_size_class_member = NULL; 300 _edje_size_class_member = NULL;
301 } 301 }
302} 302}
diff --git a/src/lib/edje/edje_multisense.c b/src/lib/edje/edje_multisense.c
index 9227ff7..0d99826 100644
--- a/src/lib/edje/edje_multisense.c
+++ b/src/lib/edje/edje_multisense.c
@@ -10,14 +10,14 @@ static Eina_Bool outfail = EINA_FALSE;
10static void 10static void
11_play_finished(void *data EINA_UNUSED, const Efl_Event *event) 11_play_finished(void *data EINA_UNUSED, const Efl_Event *event)
12{ 12{
13 efl_del(event->object); 13 efl_unref(event->object);
14} 14}
15 15
16static void 16static void
17_out_fail(void *data EINA_UNUSED, const Efl_Event *event) 17_out_fail(void *data EINA_UNUSED, const Efl_Event *event)
18{ 18{
19 outfail = EINA_TRUE; 19 outfail = EINA_TRUE;
20 efl_del(event->object); 20 efl_unref(event->object);
21 out = NULL; 21 out = NULL;
22} 22}
23 23
@@ -199,15 +199,15 @@ _edje_multisense_internal_sound_sample_play(Edje *ed, const char *sample_name, c
199 eet_data->vio.tell = eet_snd_file_tell; 199 eet_data->vio.tell = eet_snd_file_tell;
200 eet_data->offset = 0; 200 eet_data->offset = 0;
201 201
202 in = efl_add(ECORE_AUDIO_IN_SNDFILE_CLASS, NULL, efl_name_set(efl_added, snd_id_str), ecore_audio_obj_in_speed_set(efl_added, speed), ecore_audio_obj_vio_set(efl_added, &eet_data->vio, eet_data, _free), efl_event_callback_add(efl_added, ECORE_AUDIO_IN_EVENT_IN_STOPPED, _play_finished, NULL)); 202 in = efl_add_ref(ECORE_AUDIO_IN_SNDFILE_CLASS, NULL, efl_name_set(efl_added, snd_id_str), ecore_audio_obj_in_speed_set(efl_added, speed), ecore_audio_obj_vio_set(efl_added, &eet_data->vio, eet_data, _free), efl_event_callback_add(efl_added, ECORE_AUDIO_IN_EVENT_IN_STOPPED, _play_finished, NULL));
203 if (!out) 203 if (!out)
204 { 204 {
205 205
206# ifdef _WIN32 206# ifdef _WIN32
207 out = efl_add(ECORE_AUDIO_OUT_WASAPI_CLASS, NULL, efl_event_callback_add(efl_added, ECORE_AUDIO_OUT_WASAPI_EVENT_CONTEXT_FAIL, _out_fail, NULL)); 207 out = efl_add_ref(ECORE_AUDIO_OUT_WASAPI_CLASS, NULL, efl_event_callback_add(efl_added, ECORE_AUDIO_OUT_WASAPI_EVENT_CONTEXT_FAIL, _out_fail, NULL));
208# else 208# else
209# ifdef HAVE_PULSE 209# ifdef HAVE_PULSE
210 out = efl_add(ECORE_AUDIO_OUT_PULSE_CLASS, NULL, efl_event_callback_add(efl_added, ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_FAIL, _out_fail, NULL)); 210 out = efl_add_ref(ECORE_AUDIO_OUT_PULSE_CLASS, NULL, efl_event_callback_add(efl_added, ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_FAIL, _out_fail, NULL));
211# endif 211# endif
212# endif 212# endif
213 if (out) outs++; 213 if (out) outs++;
@@ -227,7 +227,7 @@ _edje_multisense_internal_sound_sample_play(Edje *ed, const char *sample_name, c
227# endif 227# endif
228# endif 228# endif
229 } 229 }
230 efl_del(in); 230 efl_unref(in);
231 return EINA_FALSE; 231 return EINA_FALSE;
232 } 232 }
233 ret = ecore_audio_obj_out_input_attach(out, in); 233 ret = ecore_audio_obj_out_input_attach(out, in);
@@ -240,7 +240,7 @@ _edje_multisense_internal_sound_sample_play(Edje *ed, const char *sample_name, c
240 complained = EINA_TRUE; 240 complained = EINA_TRUE;
241 ERR("Could not attach input"); 241 ERR("Could not attach input");
242 } 242 }
243 efl_del(in); 243 efl_unref(in);
244 return EINA_FALSE; 244 return EINA_FALSE;
245 } 245 }
246 } 246 }
@@ -283,7 +283,7 @@ _edje_multisense_internal_sound_tone_play(Edje *ed, const char *tone_name, const
283 tone = &ed->file->sound_dir->tones[i]; 283 tone = &ed->file->sound_dir->tones[i];
284 if (!strcmp(tone->name, tone_name)) 284 if (!strcmp(tone->name, tone_name))
285 { 285 {
286 in = efl_add(ECORE_AUDIO_IN_TONE_CLASS, NULL); 286 in = efl_add_ref(ECORE_AUDIO_IN_TONE_CLASS, NULL);
287 efl_name_set(in, "tone"); 287 efl_name_set(in, "tone");
288 efl_key_data_set(in, ECORE_AUDIO_ATTR_TONE_FREQ, &tone->value); 288 efl_key_data_set(in, ECORE_AUDIO_ATTR_TONE_FREQ, &tone->value);
289 ecore_audio_obj_in_length_set(in, duration); 289 ecore_audio_obj_in_length_set(in, duration);
@@ -292,10 +292,10 @@ _edje_multisense_internal_sound_tone_play(Edje *ed, const char *tone_name, const
292 if (!out) 292 if (!out)
293 { 293 {
294# ifdef _WIN32 294# ifdef _WIN32
295 out = efl_add(ECORE_AUDIO_OUT_WASAPI_CLASS, NULL, efl_event_callback_add(efl_added, ECORE_AUDIO_OUT_WASAPI_EVENT_CONTEXT_FAIL, _out_fail, NULL)); 295 out = efl_add_ref(ECORE_AUDIO_OUT_WASAPI_CLASS, NULL, efl_event_callback_add(efl_added, ECORE_AUDIO_OUT_WASAPI_EVENT_CONTEXT_FAIL, _out_fail, NULL));
296# else 296# else
297# ifdef HAVE_PULSE 297# ifdef HAVE_PULSE
298 out = efl_add(ECORE_AUDIO_OUT_PULSE_CLASS, NULL, efl_event_callback_add(efl_added, ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_FAIL, _out_fail, NULL)); 298 out = efl_add_ref(ECORE_AUDIO_OUT_PULSE_CLASS, NULL, efl_event_callback_add(efl_added, ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_FAIL, _out_fail, NULL));
299# endif 299# endif
300# endif 300# endif
301 if (out) outs++; 301 if (out) outs++;
@@ -305,7 +305,7 @@ _edje_multisense_internal_sound_tone_play(Edje *ed, const char *tone_name, const
305 if (!ret) 305 if (!ret)
306 { 306 {
307 ERR("Could not attach input"); 307 ERR("Could not attach input");
308 efl_del(in); 308 efl_unref(in);
309 return EINA_FALSE; 309 return EINA_FALSE;
310 } 310 }
311 } 311 }
@@ -353,7 +353,7 @@ _edje_multisense_shutdown(void)
353 if (out) 353 if (out)
354 { 354 {
355 // XXX: this causes an abort inside of pa!!!!! 355 // XXX: this causes an abort inside of pa!!!!!
356 //efl_del(out); 356 //efl_unref(out);
357 out = NULL; 357 out = NULL;
358 outs = 0; 358 outs = 0;
359 } 359 }
diff --git a/src/lib/eio/eio_model.c b/src/lib/eio/eio_model.c
index ec2672d..76cdc24 100644
--- a/src/lib/eio/eio_model.c
+++ b/src/lib/eio/eio_model.c
@@ -807,7 +807,7 @@ _eio_model_efl_object_parent_get(Eo *obj , Eio_Model_Data *priv)
807 char *path = ecore_file_dir_get(priv->path); 807 char *path = ecore_file_dir_get(priv->path);
808 if (path != NULL && strcmp(priv->path, "/") != 0) 808 if (path != NULL && strcmp(priv->path, "/") != 0)
809 { 809 {
810 model = efl_add(MY_CLASS, NULL, eio_model_path_set(efl_added, path)); 810 model = efl_add_ref(MY_CLASS, NULL, eio_model_path_set(efl_added, path));
811 } 811 }
812 else 812 else
813 model = NULL; 813 model = NULL;
diff --git a/src/lib/elementary/efl_ui_focus_composition.c b/src/lib/elementary/efl_ui_focus_composition.c
index 644821d..9171aa2 100644
--- a/src/lib/elementary/efl_ui_focus_composition.c
+++ b/src/lib/elementary/efl_ui_focus_composition.c
@@ -77,7 +77,7 @@ _efl_ui_focus_composition_composition_elements_set(Eo *obj, Efl_Ui_Focus_Composi
77 //get rid of all adapter objects 77 //get rid of all adapter objects
78 EINA_LIST_FREE(pd->adapters, adapter) 78 EINA_LIST_FREE(pd->adapters, adapter)
79 { 79 {
80 efl_del(adapter); 80 efl_unref(adapter);
81 } 81 }
82 82
83 //now build a composition_elements list 83 //now build a composition_elements list
@@ -95,7 +95,7 @@ _efl_ui_focus_composition_composition_elements_set(Eo *obj, Efl_Ui_Focus_Composi
95 } 95 }
96 else if (efl_isa(elem, EFL_GFX_INTERFACE)) 96 else if (efl_isa(elem, EFL_GFX_INTERFACE))
97 { 97 {
98 o = efl_add(EFL_UI_FOCUS_COMPOSITION_ADAPTER_CLASS, NULL, efl_ui_focus_composition_adapter_canvas_object_set(efl_added, elem)); 98 o = efl_add_ref(EFL_UI_FOCUS_COMPOSITION_ADAPTER_CLASS, NULL, efl_ui_focus_composition_adapter_canvas_object_set(efl_added, elem));
99 99
100 pd->adapters = eina_list_append(pd->adapters, o); 100 pd->adapters = eina_list_append(pd->adapters, o);
101 pd->register_target = eina_list_append(pd->register_target , o); 101 pd->register_target = eina_list_append(pd->register_target , o);
diff --git a/src/lib/elementary/efl_ui_list.c b/src/lib/elementary/efl_ui_list.c
index b0afa73..49c9455 100644
--- a/src/lib/elementary/efl_ui_list.c
+++ b/src/lib/elementary/efl_ui_list.c
@@ -699,7 +699,7 @@ _efl_ui_list_efl_object_finalize(Eo *obj, Efl_Ui_List_Data *pd)
699{ 699{
700 700
701 if (!pd->factory) 701 if (!pd->factory)
702 pd->factory = efl_add(EFL_UI_LAYOUT_FACTORY_CLASS, NULL); 702 pd->factory = efl_add_ref(EFL_UI_LAYOUT_FACTORY_CLASS, NULL);
703 703
704 if(!pd->relayout) 704 if(!pd->relayout)
705 { 705 {
diff --git a/src/lib/elementary/elc_fileselector.c b/src/lib/elementary/elc_fileselector.c
index 83ae8a6..f0a6d2c 100644
--- a/src/lib/elementary/elc_fileselector.c
+++ b/src/lib/elementary/elc_fileselector.c
@@ -1297,7 +1297,7 @@ _home(void *data, const Efl_Event *event EINA_UNUSED)
1297 // FIXME: maybe use vpath 1297 // FIXME: maybe use vpath
1298 if (!sd->model || efl_isa(sd->model, EIO_MODEL_CLASS)) 1298 if (!sd->model || efl_isa(sd->model, EIO_MODEL_CLASS))
1299 { 1299 {
1300 Eio_Model *model = efl_add(EIO_MODEL_CLASS, NULL, 1300 Eio_Model *model = efl_add_ref(EIO_MODEL_CLASS, NULL,
1301 eio_model_path_set(efl_added, eina_environment_home_get())); 1301 eio_model_path_set(efl_added, eina_environment_home_get()));
1302 _populate(fs, model, NULL, NULL); 1302 _populate(fs, model, NULL, NULL);
1303 efl_unref(model); 1303 efl_unref(model);
@@ -2103,7 +2103,7 @@ _from_legacy_event_call(Elm_Fileselector *fs, Elm_Fileselector_Data *sd, const E
2103 else 2103 else
2104 model_cls = efl_class_get(sd->model); 2104 model_cls = efl_class_get(sd->model);
2105 2105
2106 Efl_Model *model = efl_add(model_cls, NULL); 2106 Efl_Model *model = efl_add_ref(model_cls, NULL);
2107 _model_str_property_set(model, "path", path); 2107 _model_str_property_set(model, "path", path);
2108 2108
2109 // Call Eo event with model 2109 // Call Eo event with model
@@ -2312,7 +2312,7 @@ elm_fileselector_path_set(Evas_Object *obj,
2312void 2312void
2313_elm_fileselector_path_set_internal(Evas_Object *obj, const char *_path) 2313_elm_fileselector_path_set_internal(Evas_Object *obj, const char *_path)
2314{ 2314{
2315 Eio_Model *model = efl_add(EIO_MODEL_CLASS, NULL, eio_model_path_set(efl_added, _path)); 2315 Eio_Model *model = efl_add_ref(EIO_MODEL_CLASS, NULL, eio_model_path_set(efl_added, _path));
2316 if (!model) 2316 if (!model)
2317 { 2317 {
2318 ERR("Efl.Model allocation error"); 2318 ERR("Efl.Model allocation error");
@@ -2570,7 +2570,7 @@ _elm_fileselector_selected_set_internal(Evas_Object *obj, const char *_path)
2570 2570
2571 if (ecore_file_is_dir(path)) 2571 if (ecore_file_is_dir(path))
2572 { 2572 {
2573 model = efl_add(EIO_MODEL_CLASS, NULL, eio_model_path_set(efl_added, path)); 2573 model = efl_add_ref(EIO_MODEL_CLASS, NULL, eio_model_path_set(efl_added, path));
2574 if (!model) 2574 if (!model)
2575 { 2575 {
2576 ERR("Efl.Model allocation error"); 2576 ERR("Efl.Model allocation error");
@@ -2588,7 +2588,7 @@ _elm_fileselector_selected_set_internal(Evas_Object *obj, const char *_path)
2588 goto clean_up; 2588 goto clean_up;
2589 } 2589 }
2590 2590
2591 model = efl_add(EIO_MODEL_CLASS, NULL, eio_model_path_set(efl_added, path)); 2591 model = efl_add_ref(EIO_MODEL_CLASS, NULL, eio_model_path_set(efl_added, path));
2592 if (!model) 2592 if (!model)
2593 { 2593 {
2594 ERR("Efl.Model allocation error"); 2594 ERR("Efl.Model allocation error");
@@ -2596,7 +2596,7 @@ _elm_fileselector_selected_set_internal(Evas_Object *obj, const char *_path)
2596 } 2596 }
2597 2597
2598 dir = ecore_file_dir_get(path); 2598 dir = ecore_file_dir_get(path);
2599 parent = efl_add(EIO_MODEL_CLASS, NULL, eio_model_path_set(efl_added, dir)); 2599 parent = efl_add_ref(EIO_MODEL_CLASS, NULL, eio_model_path_set(efl_added, dir));
2600 if (parent) 2600 if (parent)
2601 { 2601 {
2602 _schedule_populate(obj, sd, parent, model); 2602 _schedule_populate(obj, sd, parent, model);
diff --git a/src/lib/elementary/elc_fileselector_button.c b/src/lib/elementary/elc_fileselector_button.c
index 0ea039d..4072c84 100644
--- a/src/lib/elementary/elc_fileselector_button.c
+++ b/src/lib/elementary/elc_fileselector_button.c
@@ -222,7 +222,7 @@ _elm_fileselector_button_efl_canvas_group_group_add(Eo *obj, Elm_Fileselector_Bu
222 if (path) priv->fsd.path = eina_stringshare_add(path); 222 if (path) priv->fsd.path = eina_stringshare_add(path);
223 else priv->fsd.path = eina_stringshare_add("/"); 223 else priv->fsd.path = eina_stringshare_add("/");
224 224
225 priv->fsd.model = efl_add(EIO_MODEL_CLASS, NULL, eio_model_path_set(efl_added, priv->fsd.path)); 225 priv->fsd.model = efl_add_ref(EIO_MODEL_CLASS, NULL, eio_model_path_set(efl_added, priv->fsd.path));
226 226
227 priv->fsd.expandable = _elm_config->fileselector_expand_enable; 227 priv->fsd.expandable = _elm_config->fileselector_expand_enable;
228 priv->inwin_mode = _elm_config->inwin_dialogs_enable; 228 priv->inwin_mode = _elm_config->inwin_dialogs_enable;
@@ -321,7 +321,7 @@ _elm_fileselector_button_path_set_internal(Evas_Object *obj, const char *path)
321{ 321{
322 ELM_FILESELECTOR_BUTTON_DATA_GET_OR_RETURN(obj, sd); 322 ELM_FILESELECTOR_BUTTON_DATA_GET_OR_RETURN(obj, sd);
323 323
324 Efl_Model *model = efl_add(EIO_MODEL_CLASS, NULL, eio_model_path_set(efl_added, path)); 324 Efl_Model *model = efl_add_ref(EIO_MODEL_CLASS, NULL, eio_model_path_set(efl_added, path));
325 if (!model) 325 if (!model)
326 { 326 {
327 ERR("Efl.Model allocation error"); 327 ERR("Efl.Model allocation error");
diff --git a/src/lib/elementary/elm_atspi_bridge.c b/src/lib/elementary/elm_atspi_bridge.c
index 0e4f89a..af49766 100644
--- a/src/lib/elementary/elm_atspi_bridge.c
+++ b/src/lib/elementary/elm_atspi_bridge.c
@@ -4556,7 +4556,7 @@ _elm_atspi_bridge_init(void)
4556{ 4556{
4557 if (!_init_count) 4557 if (!_init_count)
4558 { 4558 {
4559 _instance = efl_add(ELM_ATSPI_BRIDGE_CLASS, NULL); 4559 _instance = efl_add_ref(ELM_ATSPI_BRIDGE_CLASS, NULL);
4560 _init_count = 1; 4560 _init_count = 1;
4561 } 4561 }
4562} 4562}
@@ -4572,7 +4572,7 @@ _elm_atspi_bridge_shutdown(void)
4572{ 4572{
4573 if (_init_count) 4573 if (_init_count)
4574 { 4574 {
4575 efl_del(_instance); 4575 efl_unref(_instance);
4576 _init_count = 0; 4576 _init_count = 0;
4577 } 4577 }
4578 _efl_access_shutdown(); 4578 _efl_access_shutdown();
diff --git a/src/lib/elementary/elm_config.c b/src/lib/elementary/elm_config.c
index e7de3fc..1606390 100644
--- a/src/lib/elementary/elm_config.c
+++ b/src/lib/elementary/elm_config.c
@@ -4622,7 +4622,7 @@ _elm_config_shutdown(void)
4622 efl_del_intercept_set(_efl_config_obj, NULL); 4622 efl_del_intercept_set(_efl_config_obj, NULL);
4623 efl_loop_unregister(efl_main_loop_get(), EFL_CONFIG_INTERFACE, _efl_config_obj); 4623 efl_loop_unregister(efl_main_loop_get(), EFL_CONFIG_INTERFACE, _efl_config_obj);
4624 efl_loop_unregister(efl_main_loop_get(), EFL_CONFIG_GLOBAL_CLASS, _efl_config_obj); 4624 efl_loop_unregister(efl_main_loop_get(), EFL_CONFIG_GLOBAL_CLASS, _efl_config_obj);
4625 ELM_SAFE_FREE(_efl_config_obj, efl_del); 4625 ELM_SAFE_FREE(_efl_config_obj, efl_unref);
4626 ELM_SAFE_FREE(_elm_config, _config_free); 4626 ELM_SAFE_FREE(_elm_config, _config_free);
4627 ELM_SAFE_FREE(_elm_preferred_engine, eina_stringshare_del); 4627 ELM_SAFE_FREE(_elm_preferred_engine, eina_stringshare_del);
4628 ELM_SAFE_FREE(_elm_accel_preference, eina_stringshare_del); 4628 ELM_SAFE_FREE(_elm_accel_preference, eina_stringshare_del);
diff --git a/src/lib/elementary/elm_sys_notify.c b/src/lib/elementary/elm_sys_notify.c
index fb7c691..7db51ad 100644
--- a/src/lib/elementary/elm_sys_notify.c
+++ b/src/lib/elementary/elm_sys_notify.c
@@ -228,7 +228,7 @@ _elm_unneed_sys_notify(void)
228 if (manager) 228 if (manager)
229 { 229 {
230 elm_obj_sys_notify_servers_set(manager, ELM_SYS_NOTIFY_SERVER_NONE); 230 elm_obj_sys_notify_servers_set(manager, ELM_SYS_NOTIFY_SERVER_NONE);
231 efl_del(manager); 231 efl_unref(manager);
232 } 232 }
233} 233}
234 234
diff --git a/src/lib/evas/canvas/efl_canvas_vg.c b/src/lib/evas/canvas/efl_canvas_vg.c
index 77b0ca5..c64a8fa 100644
--- a/src/lib/evas/canvas/efl_canvas_vg.c
+++ b/src/lib/evas/canvas/efl_canvas_vg.c
@@ -505,7 +505,7 @@ _cache_vg_entry_render(Evas_Object_Protected_Data *obj,
505 root, 505 root,
506 buffer, 506 buffer,
507 do_async); 507 do_async);
508 efl_del(dupe_root); 508 efl_unref(dupe_root);
509 } 509 }
510 else 510 else
511 { 511 {
diff --git a/src/lib/evas/gesture/efl_canvas_gesture_manager.c b/src/lib/evas/gesture/efl_canvas_gesture_manager.c
index af6cc5d..88bcdd0 100644
--- a/src/lib/evas/gesture/efl_canvas_gesture_manager.c
+++ b/src/lib/evas/gesture/efl_canvas_gesture_manager.c
@@ -47,6 +47,12 @@ _cleanup_object(Eina_List *list)
47} 47}
48 48
49static void 49static void
50_hash_unref_cb(Eo *obj)
51{
52 efl_unref(obj);
53}
54
55static void
50_hash_free_cb(Eo *obj) 56_hash_free_cb(Eo *obj)
51{ 57{
52 efl_del(obj); 58 efl_del(obj);
@@ -59,7 +65,7 @@ _efl_canvas_gesture_manager_efl_object_constructor(Eo *obj, Efl_Canvas_Gesture_M
59 65
60 pd->m_recognizers = eina_hash_pointer_new(EINA_FREE_CB(_hash_free_cb)); 66 pd->m_recognizers = eina_hash_pointer_new(EINA_FREE_CB(_hash_free_cb));
61 pd->m_gesture_contex = eina_hash_pointer_new(NULL); 67 pd->m_gesture_contex = eina_hash_pointer_new(NULL);
62 pd->m_object_events = eina_hash_pointer_new(EINA_FREE_CB(_hash_free_cb)); 68 pd->m_object_events = eina_hash_pointer_new(EINA_FREE_CB(_hash_unref_cb));
63 pd->m_object_gestures = NULL; 69 pd->m_object_gestures = NULL;
64 pd->m_gestures_to_delete = NULL; 70 pd->m_gestures_to_delete = NULL;
65 71
@@ -144,7 +150,7 @@ _efl_canvas_gesture_manager_filter_event(Eo *obj, Eo *target, void *event)
144 touch_event = eina_hash_find(pd->m_object_events, &target); 150 touch_event = eina_hash_find(pd->m_object_events, &target);
145 if (!touch_event) 151 if (!touch_event)
146 { 152 {
147 touch_event = efl_add(EFL_CANVAS_GESTURE_TOUCH_CLASS, NULL); 153 touch_event = efl_add_ref(EFL_CANVAS_GESTURE_TOUCH_CLASS, NULL);
148 eina_hash_add(pd->m_object_events, &target, touch_event); 154 eina_hash_add(pd->m_object_events, &target, touch_event);
149 } 155 }
150 156
diff --git a/src/modules/evas/engines/gl_generic/evas_engine.c b/src/modules/evas/engines/gl_generic/evas_engine.c
index 623e96a..8e49f4d 100644
--- a/src/modules/evas/engines/gl_generic/evas_engine.c
+++ b/src/modules/evas/engines/gl_generic/evas_engine.c
@@ -2513,16 +2513,16 @@ eng_ector_create(void *engine EINA_UNUSED)
2513 efl_domain_current_push(EFL_ID_DOMAIN_SHARED); 2513 efl_domain_current_push(EFL_ID_DOMAIN_SHARED);
2514 if (ector_backend && !strcasecmp(ector_backend, "default")) 2514 if (ector_backend && !strcasecmp(ector_backend, "default"))
2515 { 2515 {
2516 ector = efl_add(ECTOR_SOFTWARE_SURFACE_CLASS, NULL); 2516 ector = efl_add_ref(ECTOR_SOFTWARE_SURFACE_CLASS, NULL);
2517 } 2517 }
2518 else if (ector_backend && !strcasecmp(ector_backend, "experimental")) 2518 else if (ector_backend && !strcasecmp(ector_backend, "experimental"))
2519 { 2519 {
2520 ector = efl_add(ECTOR_GL_SURFACE_CLASS, NULL); 2520 ector = efl_add_ref(ECTOR_GL_SURFACE_CLASS, NULL);
2521 use_gl = EINA_TRUE; 2521 use_gl = EINA_TRUE;
2522 } 2522 }
2523 else 2523 else
2524 { 2524 {
2525 ector = efl_add(ECTOR_CAIRO_SOFTWARE_SURFACE_CLASS, NULL); 2525 ector = efl_add_ref(ECTOR_CAIRO_SOFTWARE_SURFACE_CLASS, NULL);
2526 use_cairo = EINA_TRUE; 2526 use_cairo = EINA_TRUE;
2527 } 2527 }
2528 efl_domain_current_pop(); 2528 efl_domain_current_pop();
@@ -2532,7 +2532,7 @@ eng_ector_create(void *engine EINA_UNUSED)
2532static void 2532static void
2533eng_ector_destroy(void *engine EINA_UNUSED, Ector_Surface *ector) 2533eng_ector_destroy(void *engine EINA_UNUSED, Ector_Surface *ector)
2534{ 2534{
2535 if (ector) efl_del(ector); 2535 if (ector) efl_unref(ector);
2536} 2536}
2537 2537
2538static Ector_Buffer * 2538static Ector_Buffer *
diff --git a/src/modules/evas/engines/software_generic/evas_engine.c b/src/modules/evas/engines/software_generic/evas_engine.c
index 46b6764..991a371 100644
--- a/src/modules/evas/engines/software_generic/evas_engine.c
+++ b/src/modules/evas/engines/software_generic/evas_engine.c
@@ -4327,12 +4327,12 @@ eng_ector_create(void *engine EINA_UNUSED)
4327 efl_domain_current_push(EFL_ID_DOMAIN_SHARED); 4327 efl_domain_current_push(EFL_ID_DOMAIN_SHARED);
4328 if (ector_backend && !strcasecmp(ector_backend, "default")) 4328 if (ector_backend && !strcasecmp(ector_backend, "default"))
4329 { 4329 {
4330 ector = efl_add(ECTOR_SOFTWARE_SURFACE_CLASS, NULL); 4330 ector = efl_add_ref(ECTOR_SOFTWARE_SURFACE_CLASS, NULL);
4331 use_cairo = EINA_FALSE; 4331 use_cairo = EINA_FALSE;
4332 } 4332 }
4333 else 4333 else
4334 { 4334 {
4335 ector = efl_add(ECTOR_CAIRO_SOFTWARE_SURFACE_CLASS, NULL); 4335 ector = efl_add_ref(ECTOR_CAIRO_SOFTWARE_SURFACE_CLASS, NULL);
4336 use_cairo = EINA_TRUE; 4336 use_cairo = EINA_TRUE;
4337 } 4337 }
4338 efl_domain_current_pop(); 4338 efl_domain_current_pop();
@@ -4387,7 +4387,7 @@ eng_ector_surface_cache_drop(void *engine, void *key)
4387static void 4387static void
4388eng_ector_destroy(void *data EINA_UNUSED, Ector_Surface *ector) 4388eng_ector_destroy(void *data EINA_UNUSED, Ector_Surface *ector)
4389{ 4389{
4390 if (ector) efl_del(ector); 4390 if (ector) efl_unref(ector);
4391} 4391}
4392 4392
4393static Ector_Buffer * 4393static Ector_Buffer *
@@ -4400,7 +4400,7 @@ eng_ector_buffer_wrap(void *data, Evas *e EINA_UNUSED, void *engine_image)
4400 4400
4401 if (!efl_domain_current_push(EFL_ID_DOMAIN_SHARED)) 4401 if (!efl_domain_current_push(EFL_ID_DOMAIN_SHARED))
4402 return NULL; 4402 return NULL;
4403 buf = efl_add(EVAS_ECTOR_SOFTWARE_BUFFER_CLASS, NULL, 4403 buf = efl_add_ref(EVAS_ECTOR_SOFTWARE_BUFFER_CLASS, NULL,
4404 evas_ector_buffer_engine_image_set(efl_added, data, ie)); 4404 evas_ector_buffer_engine_image_set(efl_added, data, ie));
4405 efl_domain_current_pop(); 4405 efl_domain_current_pop();
4406 4406
diff --git a/src/tests/ecore/ecore_test_ecore_audio.c b/src/tests/ecore/ecore_test_ecore_audio.c
index 23f638a..c7e4006 100644
--- a/src/tests/ecore/ecore_test_ecore_audio.c
+++ b/src/tests/ecore/ecore_test_ecore_audio.c
@@ -57,14 +57,14 @@ START_TEST(ecore_test_ecore_audio_obj_pulse)
57 Eina_Bool ret = EINA_FALSE; 57 Eina_Bool ret = EINA_FALSE;
58 Eina_Bool pulse_context_failed = EINA_FALSE; 58 Eina_Bool pulse_context_failed = EINA_FALSE;
59 59
60 in = efl_add(ECORE_AUDIO_IN_SNDFILE_CLASS, NULL); 60 in = efl_add_ref(ECORE_AUDIO_IN_SNDFILE_CLASS, NULL);
61 fail_if(!in); 61 fail_if(!in);
62 62
63 efl_name_set(in, "sample.wav"); 63 efl_name_set(in, "sample.wav");
64 ret = ecore_audio_obj_source_set(in, TESTS_SRC_DIR"/sample.wav"); 64 ret = ecore_audio_obj_source_set(in, TESTS_SRC_DIR"/sample.wav");
65 fail_if(!ret); 65 fail_if(!ret);
66 66
67 out = efl_add(ECORE_AUDIO_OUT_PULSE_CLASS, NULL); 67 out = efl_add_ref(ECORE_AUDIO_OUT_PULSE_CLASS, NULL);
68 fail_if(!out); 68 fail_if(!out);
69 69
70 ecore_timer_add(1.8, _seek_vol, in); 70 ecore_timer_add(1.8, _seek_vol, in);
@@ -78,8 +78,8 @@ START_TEST(ecore_test_ecore_audio_obj_pulse)
78 ecore_main_loop_begin(); 78 ecore_main_loop_begin();
79 fail_if(pulse_context_failed); 79 fail_if(pulse_context_failed);
80 80
81 efl_del(out); 81 efl_unref(out);
82 efl_del(in); 82 efl_unref(in);
83} 83}
84END_TEST 84END_TEST
85#endif 85#endif
@@ -96,7 +96,7 @@ static Eina_Bool
96_idle_del(void *data) 96_idle_del(void *data)
97{ 97{
98 Eo *in = data; 98 Eo *in = data;
99 efl_del(in); 99 efl_unref(in);
100 ecore_idler_add(_quit, NULL); 100 ecore_idler_add(_quit, NULL);
101 101
102 return EINA_FALSE; 102 return EINA_FALSE;
@@ -108,12 +108,12 @@ START_TEST(ecore_test_ecore_audio_cleanup)
108 int freq = 1000; 108 int freq = 1000;
109 Eina_Bool ret = EINA_FALSE; 109 Eina_Bool ret = EINA_FALSE;
110 110
111 in = efl_add(ECORE_AUDIO_IN_TONE_CLASS, NULL); 111 in = efl_add_ref(ECORE_AUDIO_IN_TONE_CLASS, NULL);
112 fail_if(!in); 112 fail_if(!in);
113 efl_key_data_set(in, ECORE_AUDIO_ATTR_TONE_FREQ, &freq); 113 efl_key_data_set(in, ECORE_AUDIO_ATTR_TONE_FREQ, &freq);
114 ecore_audio_obj_in_length_set(in, 2); 114 ecore_audio_obj_in_length_set(in, 2);
115 115
116 out = efl_add(ECORE_AUDIO_OUT_SNDFILE_CLASS, NULL); 116 out = efl_add_ref(ECORE_AUDIO_OUT_SNDFILE_CLASS, NULL);
117 fail_if(!out); 117 fail_if(!out);
118 ret = ecore_audio_obj_format_set(out, ECORE_AUDIO_FORMAT_OGG); 118 ret = ecore_audio_obj_format_set(out, ECORE_AUDIO_FORMAT_OGG);
119 fail_if(!ret); 119 fail_if(!ret);
@@ -139,7 +139,7 @@ START_TEST(ecore_test_ecore_audio_obj_tone)
139 Eina_Bool ret; 139 Eina_Bool ret;
140 char *tmp; 140 char *tmp;
141 141
142 in = efl_add(ECORE_AUDIO_IN_TONE_CLASS, NULL); 142 in = efl_add_ref(ECORE_AUDIO_IN_TONE_CLASS, NULL);
143 fail_if(!in); 143 fail_if(!in);
144 144
145 efl_name_set(in, "tone"); 145 efl_name_set(in, "tone");
@@ -197,7 +197,7 @@ START_TEST(ecore_test_ecore_audio_obj_tone)
197 len = ecore_audio_obj_in_remaining_get(in); 197 len = ecore_audio_obj_in_remaining_get(in);
198 fail_if(len != 1.0); 198 fail_if(len != 1.0);
199 199
200 out = efl_add(ECORE_AUDIO_OUT_SNDFILE_CLASS, NULL); 200 out = efl_add_ref(ECORE_AUDIO_OUT_SNDFILE_CLASS, NULL);
201 fail_if(!out); 201 fail_if(!out);
202 202
203 efl_name_set(out, "tmp.wav"); 203 efl_name_set(out, "tmp.wav");
@@ -214,8 +214,8 @@ START_TEST(ecore_test_ecore_audio_obj_tone)
214 214
215 ecore_main_loop_begin(); 215 ecore_main_loop_begin();
216 216
217 efl_del(in); 217 efl_unref(in);
218 efl_del(out); 218 efl_unref(out);
219 219
220 //TODO: Compare and fail 220 //TODO: Compare and fail
221 ecore_file_remove(TESTS_BUILD_DIR"/tmp.wav"); 221 ecore_file_remove(TESTS_BUILD_DIR"/tmp.wav");
@@ -231,7 +231,7 @@ START_TEST(ecore_test_ecore_audio_obj_sndfile)
231 Ecore_Audio_Format fmt; 231 Ecore_Audio_Format fmt;
232 const char *src; 232 const char *src;
233 233
234 in = efl_add(ECORE_AUDIO_IN_SNDFILE_CLASS, NULL); 234 in = efl_add_ref(ECORE_AUDIO_IN_SNDFILE_CLASS, NULL);
235 fail_if(!in); 235 fail_if(!in);
236 236
237 fmt = ecore_audio_obj_format_get(in); 237 fmt = ecore_audio_obj_format_get(in);
@@ -277,7 +277,7 @@ START_TEST(ecore_test_ecore_audio_obj_sndfile)
277 len = ecore_audio_obj_in_seek(in, -1.5, SEEK_END); 277 len = ecore_audio_obj_in_seek(in, -1.5, SEEK_END);
278 fail_if(fabs(rem - 1 - len) > 0.6); 278 fail_if(fabs(rem - 1 - len) > 0.6);
279 279
280 out = efl_add(ECORE_AUDIO_OUT_SNDFILE_CLASS, NULL); 280 out = efl_add_ref(ECORE_AUDIO_OUT_SNDFILE_CLASS, NULL);
281 fail_if(!out); 281 fail_if(!out);
282 282
283 efl_name_set(out, "tmp.wav"); 283 efl_name_set(out, "tmp.wav");
@@ -304,8 +304,8 @@ START_TEST(ecore_test_ecore_audio_obj_sndfile)
304 304
305 ecore_main_loop_begin(); 305 ecore_main_loop_begin();
306 306
307 efl_del(in); 307 efl_unref(in);
308 efl_del(out); 308 efl_unref(out);
309 309
310 //TODO: Compare and fail 310 //TODO: Compare and fail
311 ecore_file_remove(TESTS_BUILD_DIR"/tmp.wav"); 311 ecore_file_remove(TESTS_BUILD_DIR"/tmp.wav");
@@ -318,9 +318,9 @@ START_TEST(ecore_test_ecore_audio_obj_in_out)
318 Eina_List *in3; 318 Eina_List *in3;
319 Eina_Bool attached; 319 Eina_Bool attached;
320 320
321 Eo *in = efl_add(ECORE_AUDIO_IN_CLASS, NULL); 321 Eo *in = efl_add_ref(ECORE_AUDIO_IN_CLASS, NULL);
322 Eo *in2 = efl_add(ECORE_AUDIO_IN_CLASS, NULL); 322 Eo *in2 = efl_add_ref(ECORE_AUDIO_IN_CLASS, NULL);
323 Eo *out = efl_add(ECORE_AUDIO_OUT_CLASS, NULL); 323 Eo *out = efl_add_ref(ECORE_AUDIO_OUT_CLASS, NULL);
324 324
325 fail_if(!in); 325 fail_if(!in);
326 fail_if(!in2); 326 fail_if(!in2);
@@ -357,20 +357,20 @@ START_TEST(ecore_test_ecore_audio_obj_in_out)
357 fail_if(eina_list_count(in3) != 2); 357 fail_if(eina_list_count(in3) != 2);
358 fail_if(eina_list_data_get(in3) != in); 358 fail_if(eina_list_data_get(in3) != in);
359 359
360 efl_del(in2); 360 efl_unref(in2);
361 361
362 in3 = ecore_audio_obj_out_inputs_get(out); 362 in3 = ecore_audio_obj_out_inputs_get(out);
363 363
364 fail_if(eina_list_count(in3) != 1); 364 fail_if(eina_list_count(in3) != 1);
365 fail_if(eina_list_data_get(in3) != in); 365 fail_if(eina_list_data_get(in3) != in);
366 366
367 efl_del(out); 367 efl_unref(out);
368 368
369 out2 = ecore_audio_obj_in_output_get(in); 369 out2 = ecore_audio_obj_in_output_get(in);
370 370
371 fail_if(out2); 371 fail_if(out2);
372 372
373 efl_del(in); 373 efl_unref(in);
374} 374}
375END_TEST 375END_TEST
376 376
@@ -416,10 +416,10 @@ START_TEST(ecore_test_ecore_audio_obj_vio)
416{ 416{
417 Eo *in, *out; 417 Eo *in, *out;
418 418
419 in = efl_add(ECORE_AUDIO_IN_CLASS, NULL); 419 in = efl_add_ref(ECORE_AUDIO_IN_CLASS, NULL);
420 fail_if(!in); 420 fail_if(!in);
421 421
422 out = efl_add(ECORE_AUDIO_OUT_CLASS, NULL); 422 out = efl_add_ref(ECORE_AUDIO_OUT_CLASS, NULL);
423 fail_if(!out); 423 fail_if(!out);
424 424
425 ecore_audio_obj_vio_set(in, &in_vio, NULL, NULL); 425 ecore_audio_obj_vio_set(in, &in_vio, NULL, NULL);
@@ -429,8 +429,8 @@ START_TEST(ecore_test_ecore_audio_obj_vio)
429 429
430 ecore_main_loop_begin(); 430 ecore_main_loop_begin();
431 431
432 efl_del(out); 432 efl_unref(out);
433 efl_del(in); 433 efl_unref(in);
434} 434}
435END_TEST 435END_TEST
436 436
@@ -454,7 +454,7 @@ START_TEST(ecore_test_ecore_audio_obj_in)
454 Ecore_Audio_Vio vio; 454 Ecore_Audio_Vio vio;
455 Eina_Bool freed = EINA_FALSE; 455 Eina_Bool freed = EINA_FALSE;
456 456
457 Eo *in = efl_add(ECORE_AUDIO_IN_CLASS, NULL); 457 Eo *in = efl_add_ref(ECORE_AUDIO_IN_CLASS, NULL);
458 458
459 fail_if(!in); 459 fail_if(!in);
460 460
@@ -529,7 +529,7 @@ START_TEST(ecore_test_ecore_audio_obj_in)
529 fail_if(buf[i] != 0x00); 529 fail_if(buf[i] != 0x00);
530 } 530 }
531 531
532 efl_del(in); 532 efl_unref(in);
533} 533}
534END_TEST 534END_TEST
535 535
@@ -541,10 +541,10 @@ START_TEST(ecore_test_ecore_audio_obj)
541 double volume; 541 double volume;
542 Eo *objs[2], *obj; 542 Eo *objs[2], *obj;
543 543
544 objs[0] = efl_add(ECORE_AUDIO_IN_CLASS, NULL); 544 objs[0] = efl_add_ref(ECORE_AUDIO_IN_CLASS, NULL);
545 fail_if(!objs[0]); 545 fail_if(!objs[0]);
546 546
547 objs[1] = efl_add(ECORE_AUDIO_OUT_CLASS, NULL); 547 objs[1] = efl_add_ref(ECORE_AUDIO_OUT_CLASS, NULL);
548 fail_if(!objs[1]); 548 fail_if(!objs[1]);
549 549
550 for (i=0; i<2; i++) { 550 for (i=0; i<2; i++) {
@@ -577,7 +577,7 @@ START_TEST(ecore_test_ecore_audio_obj)
577 volume = ecore_audio_obj_volume_get(obj); 577 volume = ecore_audio_obj_volume_get(obj);
578 fail_if(volume != 0.5); 578 fail_if(volume != 0.5);
579 579
580 efl_del(obj); 580 efl_unref(obj);
581 } 581 }
582 582
583} 583}
diff --git a/src/tests/ecore/ecore_test_promise2.c b/src/tests/ecore/ecore_test_promise2.c
index ff663f1..bd9eec8 100644
--- a/src/tests/ecore/ecore_test_promise2.c
+++ b/src/tests/ecore/ecore_test_promise2.c
@@ -871,7 +871,7 @@ START_TEST(efl_test_promise_eo)
871 fail_if(!ecore_init()); 871 fail_if(!ecore_init());
872 872
873 //Use a random object.. 873 //Use a random object..
874 obj = efl_add(EFL_IO_BUFFER_CLASS, NULL); 874 obj = efl_add_ref(EFL_IO_BUFFER_CLASS, NULL);
875 fail_if(!obj); 875 fail_if(!obj);
876 efl_key_data_set(obj, "free_called", &free_called); 876 efl_key_data_set(obj, "free_called", &free_called);
877 f = eina_future_chain(_int_future_get(), 877 f = eina_future_chain(_int_future_get(),
@@ -930,7 +930,7 @@ START_TEST(efl_test_promise_eo_link)
930 fail_if(!ecore_init()); 930 fail_if(!ecore_init());
931 931
932 //Use a random object.. 932 //Use a random object..
933 obj = efl_add(EFL_IO_BUFFER_CLASS, NULL); 933 obj = efl_add_ref(EFL_IO_BUFFER_CLASS, NULL);
934 fail_if(!obj); 934 fail_if(!obj);
935 935
936 efl_key_data_set(obj, "err_called", &err_called); 936 efl_key_data_set(obj, "err_called", &err_called);
diff --git a/src/tests/ecore_con/ecore_con_test_efl_net_ip_address.c b/src/tests/ecore_con/ecore_con_test_efl_net_ip_address.c
index 563af26..dc9b7e8 100644
--- a/src/tests/ecore_con/ecore_con_test_efl_net_ip_address.c
+++ b/src/tests/ecore_con/ecore_con_test_efl_net_ip_address.c
@@ -307,29 +307,29 @@ START_TEST(ecore_test_efl_net_ip_address_ipv4_manual_ok)
307 307
308 addr.sin_port = htons(12345); 308 addr.sin_port = htons(12345);
309 addr.sin_addr.s_addr = htonl(0xabcdefafU); 309 addr.sin_addr.s_addr = htonl(0xabcdefafU);
310 o = efl_add(EFL_NET_IP_ADDRESS_CLASS, NULL, 310 o = efl_add_ref(EFL_NET_IP_ADDRESS_CLASS, NULL,
311 efl_net_ip_address_family_set(efl_added, AF_INET), 311 efl_net_ip_address_family_set(efl_added, AF_INET),
312 efl_net_ip_address_port_set(efl_added, ntohs(addr.sin_port)), 312 efl_net_ip_address_port_set(efl_added, ntohs(addr.sin_port)),
313 efl_net_ip_address_set(efl_added, slice)); 313 efl_net_ip_address_set(efl_added, slice));
314 _ipv4_check(o, &addr); 314 _ipv4_check(o, &addr);
315 efl_del(o); 315 efl_unref(o);
316 316
317 addr.sin_port = htons(8081); 317 addr.sin_port = htons(8081);
318 addr.sin_addr.s_addr = htonl(0); 318 addr.sin_addr.s_addr = htonl(0);
319 o = efl_add(EFL_NET_IP_ADDRESS_CLASS, NULL, 319 o = efl_add_ref(EFL_NET_IP_ADDRESS_CLASS, NULL,
320 efl_net_ip_address_family_set(efl_added, AF_INET), 320 efl_net_ip_address_family_set(efl_added, AF_INET),
321 efl_net_ip_address_port_set(efl_added, ntohs(addr.sin_port)), 321 efl_net_ip_address_port_set(efl_added, ntohs(addr.sin_port)),
322 efl_net_ip_address_set(efl_added, slice)); 322 efl_net_ip_address_set(efl_added, slice));
323 _ipv4_check(o, &addr); 323 _ipv4_check(o, &addr);
324 efl_del(o); 324 efl_unref(o);
325 325
326 addr.sin_port = htons(0); 326 addr.sin_port = htons(0);
327 addr.sin_addr.s_addr = htonl(0x12345678); 327 addr.sin_addr.s_addr = htonl(0x12345678);
328 o = efl_add(EFL_NET_IP_ADDRESS_CLASS, NULL, 328 o = efl_add_ref(EFL_NET_IP_ADDRESS_CLASS, NULL,
329 efl_net_ip_address_family_set(efl_added, AF_INET), 329 efl_net_ip_address_family_set(efl_added, AF_INET),
330 efl_net_ip_address_set(efl_added, slice)); 330 efl_net_ip_address_set(efl_added, slice));
331 _ipv4_check(o, &addr); 331 _ipv4_check(o, &addr);
332 efl_del(o); 332 efl_unref(o);
333 333
334 ecore_con_shutdown(); 334 ecore_con_shutdown();
335} 335}
@@ -348,46 +348,46 @@ START_TEST(ecore_test_efl_net_ip_address_ipv4_manual_fail)
348 ecore_con_init(); 348 ecore_con_init();
349 349
350 TRAP_ERRORS_BEGIN(eina_safety, ERR, "safety check failed: pd->addr.sa_family == 0 is true"); 350 TRAP_ERRORS_BEGIN(eina_safety, ERR, "safety check failed: pd->addr.sa_family == 0 is true");
351 o = efl_add(EFL_NET_IP_ADDRESS_CLASS, NULL); 351 o = efl_add_ref(EFL_NET_IP_ADDRESS_CLASS, NULL);
352 ck_assert_ptr_eq(o, NULL); 352 ck_assert_ptr_eq(o, NULL);
353 TRAP_ERRORS_FINISH(1); 353 TRAP_ERRORS_FINISH(1);
354 354
355 TRAP_ERRORS_BEGIN(eina_safety, ERR, NULL); 355 TRAP_ERRORS_BEGIN(eina_safety, ERR, NULL);
356 o = efl_add(EFL_NET_IP_ADDRESS_CLASS, NULL, 356 o = efl_add_ref(EFL_NET_IP_ADDRESS_CLASS, NULL,
357 efl_net_ip_address_family_set(efl_added, 12345)); 357 efl_net_ip_address_family_set(efl_added, 12345));
358 ck_assert_ptr_eq(o, NULL); 358 ck_assert_ptr_eq(o, NULL);
359 TRAP_ERRORS_FINISH(2); 359 TRAP_ERRORS_FINISH(2);
360 360
361 TRAP_ERRORS_BEGIN(eina_safety, ERR, "safety check failed: pd->addr.sa_family == 0 is true"); 361 TRAP_ERRORS_BEGIN(eina_safety, ERR, "safety check failed: pd->addr.sa_family == 0 is true");
362 o = efl_add(EFL_NET_IP_ADDRESS_CLASS, NULL, 362 o = efl_add_ref(EFL_NET_IP_ADDRESS_CLASS, NULL,
363 efl_net_ip_address_set(efl_added, wrong_slice)); 363 efl_net_ip_address_set(efl_added, wrong_slice));
364 ck_assert_ptr_eq(o, NULL); 364 ck_assert_ptr_eq(o, NULL);
365 TRAP_ERRORS_FINISH(2); 365 TRAP_ERRORS_FINISH(2);
366 366
367 TRAP_ERRORS_BEGIN(eina_safety, ERR, "safety check failed: pd->addr.sa_family == 0 is true"); 367 TRAP_ERRORS_BEGIN(eina_safety, ERR, "safety check failed: pd->addr.sa_family == 0 is true");
368 o = efl_add(EFL_NET_IP_ADDRESS_CLASS, NULL, 368 o = efl_add_ref(EFL_NET_IP_ADDRESS_CLASS, NULL,
369 efl_net_ip_address_port_set(efl_added, 1234)); 369 efl_net_ip_address_port_set(efl_added, 1234));
370 ck_assert_ptr_eq(o, NULL); 370 ck_assert_ptr_eq(o, NULL);
371 TRAP_ERRORS_FINISH(2); 371 TRAP_ERRORS_FINISH(2);
372 372
373 TRAP_ERRORS_BEGIN(eina_safety, ERR, "safety check failed: pd->addr.sa_family == 0 is true"); 373 TRAP_ERRORS_BEGIN(eina_safety, ERR, "safety check failed: pd->addr.sa_family == 0 is true");
374 o = efl_add(EFL_NET_IP_ADDRESS_CLASS, NULL, 374 o = efl_add_ref(EFL_NET_IP_ADDRESS_CLASS, NULL,
375 efl_net_ip_address_port_set(efl_added, 1234), 375 efl_net_ip_address_port_set(efl_added, 1234),
376 efl_net_ip_address_set(efl_added, wrong_slice)); 376 efl_net_ip_address_set(efl_added, wrong_slice));
377 ck_assert_ptr_eq(o, NULL); 377 ck_assert_ptr_eq(o, NULL);
378 TRAP_ERRORS_FINISH(3); 378 TRAP_ERRORS_FINISH(3);
379 379
380 TRAP_ERRORS_BEGIN(eina_safety, ERR, "safety check failed: rw_slice.len != address.len is true"); 380 TRAP_ERRORS_BEGIN(eina_safety, ERR, "safety check failed: rw_slice.len != address.len is true");
381 o = efl_add(EFL_NET_IP_ADDRESS_CLASS, NULL, 381 o = efl_add_ref(EFL_NET_IP_ADDRESS_CLASS, NULL,
382 efl_net_ip_address_family_set(efl_added, AF_INET), 382 efl_net_ip_address_family_set(efl_added, AF_INET),
383 efl_net_ip_address_set(efl_added, wrong_slice)); 383 efl_net_ip_address_set(efl_added, wrong_slice));
384 _ipv4_check(o, &addr); 384 _ipv4_check(o, &addr);
385 efl_del(o); 385 efl_unref(o);
386 TRAP_ERRORS_FINISH(1); 386 TRAP_ERRORS_FINISH(1);
387 387
388 addr.sin_port = htons(12345); 388 addr.sin_port = htons(12345);
389 addr.sin_addr.s_addr = htonl(0xabcdefafU); 389 addr.sin_addr.s_addr = htonl(0xabcdefafU);
390 o = efl_add(EFL_NET_IP_ADDRESS_CLASS, NULL, 390 o = efl_add_ref(EFL_NET_IP_ADDRESS_CLASS, NULL,
391 efl_net_ip_address_family_set(efl_added, AF_INET), 391 efl_net_ip_address_family_set(efl_added, AF_INET),
392 efl_net_ip_address_port_set(efl_added, ntohs(addr.sin_port)), 392 efl_net_ip_address_port_set(efl_added, ntohs(addr.sin_port)),
393 efl_net_ip_address_set(efl_added, slice)); 393 efl_net_ip_address_set(efl_added, slice));
@@ -417,7 +417,7 @@ START_TEST(ecore_test_efl_net_ip_address_ipv4_manual_fail)
417 efl_net_ip_address_set(o, slice); 417 efl_net_ip_address_set(o, slice);
418 TRAP_ERRORS_FINISH(1); 418 TRAP_ERRORS_FINISH(1);
419 419
420 efl_del(o); 420 efl_unref(o);
421 421
422 ecore_con_shutdown(); 422 ecore_con_shutdown();
423} 423}
@@ -439,7 +439,7 @@ START_TEST(ecore_test_efl_net_ip_address_ipv4_create_ok)
439 ntohs(addr.sin_port), 439 ntohs(addr.sin_port),
440 slice); 440 slice);
441 _ipv4_check(o, &addr); 441 _ipv4_check(o, &addr);
442 efl_del(o); 442 efl_unref(o);
443 443
444 addr.sin_port = htons(8081); 444 addr.sin_port = htons(8081);
445 addr.sin_addr.s_addr = htonl(0); 445 addr.sin_addr.s_addr = htonl(0);
@@ -447,7 +447,7 @@ START_TEST(ecore_test_efl_net_ip_address_ipv4_create_ok)
447 ntohs(addr.sin_port), 447 ntohs(addr.sin_port),
448 slice); 448 slice);
449 _ipv4_check(o, &addr); 449 _ipv4_check(o, &addr);
450 efl_del(o); 450 efl_unref(o);
451 451
452 addr.sin_port = htons(0); 452 addr.sin_port = htons(0);
453 addr.sin_addr.s_addr = htonl(0x12345678); 453 addr.sin_addr.s_addr = htonl(0x12345678);
@@ -455,7 +455,7 @@ START_TEST(ecore_test_efl_net_ip_address_ipv4_create_ok)
455 ntohs(addr.sin_port), 455 ntohs(addr.sin_port),
456 slice); 456 slice);
457 _ipv4_check(o, &addr); 457 _ipv4_check(o, &addr);
458 efl_del(o); 458 efl_unref(o);
459 459
460 ecore_con_shutdown(); 460 ecore_con_shutdown();
461} 461}
@@ -494,14 +494,14 @@ START_TEST(ecore_test_efl_net_ip_address_ipv4_create_sockaddr_ok)
494 o = efl_net_ip_address_create_sockaddr(EFL_NET_IP_ADDRESS_CLASS, &addr); 494 o = efl_net_ip_address_create_sockaddr(EFL_NET_IP_ADDRESS_CLASS, &addr);
495 ck_assert_ptr_ne(&addr, efl_net_ip_address_sockaddr_get(o)); 495 ck_assert_ptr_ne(&addr, efl_net_ip_address_sockaddr_get(o));
496 _ipv4_check(o, &addr); 496 _ipv4_check(o, &addr);
497 efl_del(o); 497 efl_unref(o);
498 498
499 addr.sin_port = htons(0); 499 addr.sin_port = htons(0);
500 addr.sin_addr.s_addr = htonl(0); 500 addr.sin_addr.s_addr = htonl(0);
501 o = efl_net_ip_address_create_sockaddr(EFL_NET_IP_ADDRESS_CLASS, &addr); 501 o = efl_net_ip_address_create_sockaddr(EFL_NET_IP_ADDRESS_CLASS, &addr);
502 ck_assert_ptr_ne(&addr, efl_net_ip_address_sockaddr_get(o)); 502 ck_assert_ptr_ne(&addr, efl_net_ip_address_sockaddr_get(o));
503 _ipv4_check(o, &addr); 503 _ipv4_check(o, &addr);
504 efl_del(o); 504 efl_unref(o);
505 505
506 ecore_con_shutdown(); 506 ecore_con_shutdown();
507} 507}
@@ -539,22 +539,22 @@ START_TEST(ecore_test_efl_net_ip_address_ipv4_parse_ok)
539 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "127.0.0.1:12345"); 539 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "127.0.0.1:12345");
540 ck_assert_ptr_ne(o, NULL); 540 ck_assert_ptr_ne(o, NULL);
541 ck_assert_str_eq(efl_net_ip_address_string_get(o), "127.0.0.1:12345"); 541 ck_assert_str_eq(efl_net_ip_address_string_get(o), "127.0.0.1:12345");
542 efl_del(o); 542 efl_unref(o);
543 543
544 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "127.0.0.1:0"); 544 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "127.0.0.1:0");
545 ck_assert_ptr_ne(o, NULL); 545 ck_assert_ptr_ne(o, NULL);
546 ck_assert_str_eq(efl_net_ip_address_string_get(o), "127.0.0.1"); 546 ck_assert_str_eq(efl_net_ip_address_string_get(o), "127.0.0.1");
547 efl_del(o); 547 efl_unref(o);
548 548
549 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "127.0.0.1"); 549 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "127.0.0.1");
550 ck_assert_ptr_ne(o, NULL); 550 ck_assert_ptr_ne(o, NULL);
551 ck_assert_str_eq(efl_net_ip_address_string_get(o), "127.0.0.1"); 551 ck_assert_str_eq(efl_net_ip_address_string_get(o), "127.0.0.1");
552 efl_del(o); 552 efl_unref(o);
553 553
554 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "192.168.0.123:80"); 554 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "192.168.0.123:80");
555 ck_assert_ptr_ne(o, NULL); 555 ck_assert_ptr_ne(o, NULL);
556 ck_assert_str_eq(efl_net_ip_address_string_get(o), "192.168.0.123:80"); 556 ck_assert_str_eq(efl_net_ip_address_string_get(o), "192.168.0.123:80");
557 efl_del(o); 557 efl_unref(o);
558 558
559 ecore_con_shutdown(); 559 ecore_con_shutdown();
560} 560}
@@ -716,7 +716,7 @@ START_TEST(ecore_test_efl_net_ip_address_ipv4_checks)
716 ck_assert_int_eq(efl_net_ip_address_ipv6_local_link_check(o), EINA_FALSE); 716 ck_assert_int_eq(efl_net_ip_address_ipv6_local_link_check(o), EINA_FALSE);
717 ck_assert_int_eq(efl_net_ip_address_ipv6_local_site_check(o), EINA_FALSE); 717 ck_assert_int_eq(efl_net_ip_address_ipv6_local_site_check(o), EINA_FALSE);
718 718
719 efl_del(o); 719 efl_unref(o);
720 } 720 }
721 721
722 ecore_con_shutdown(); 722 ecore_con_shutdown();
@@ -773,21 +773,21 @@ START_TEST(ecore_test_efl_net_ip_address_ipv6_manual_ok)
773 773
774 addr.sin6_port = htons(12345); 774 addr.sin6_port = htons(12345);
775 _ipv6_set(&addr, 1, 2, 3, 4, 5, 6, 7, 8); 775 _ipv6_set(&addr, 1, 2, 3, 4, 5, 6, 7, 8);
776 o = efl_add(EFL_NET_IP_ADDRESS_CLASS, NULL, 776 o = efl_add_ref(EFL_NET_IP_ADDRESS_CLASS, NULL,
777 efl_net_ip_address_family_set(efl_added, AF_INET6), 777 efl_net_ip_address_family_set(efl_added, AF_INET6),
778 efl_net_ip_address_port_set(efl_added, ntohs(addr.sin6_port)), 778 efl_net_ip_address_port_set(efl_added, ntohs(addr.sin6_port)),
779 efl_net_ip_address_set(efl_added, slice)); 779 efl_net_ip_address_set(efl_added, slice));
780 _ipv6_check(o, &addr); 780 _ipv6_check(o, &addr);
781 efl_del(o); 781 efl_unref(o);
782 782
783 addr.sin6_port = htons(8081); 783 addr.sin6_port = htons(8081);
784 _ipv6_set(&addr, 0, 0, 0, 0, 0, 0, 0, 0); 784 _ipv6_set(&addr, 0, 0, 0, 0, 0, 0, 0, 0);
785 o = efl_add(EFL_NET_IP_ADDRESS_CLASS, NULL, 785 o = efl_add_ref(EFL_NET_IP_ADDRESS_CLASS, NULL,
786 efl_net_ip_address_family_set(efl_added, AF_INET6), 786 efl_net_ip_address_family_set(efl_added, AF_INET6),
787 efl_net_ip_address_port_set(efl_added, ntohs(addr.sin6_port)), 787 efl_net_ip_address_port_set(efl_added, ntohs(addr.sin6_port)),
788 efl_net_ip_address_set(efl_added, slice)); 788 efl_net_ip_address_set(efl_added, slice));
789 _ipv6_check(o, &addr); 789 _ipv6_check(o, &addr);
790 efl_del(o); 790 efl_unref(o);
791 791
792 ecore_con_shutdown(); 792 ecore_con_shutdown();
793} 793}
@@ -808,16 +808,16 @@ START_TEST(ecore_test_efl_net_ip_address_ipv6_manual_fail)
808 /* generic errors checked at ecore_test_efl_net_ip_address_ipv4_manual_fail */ 808 /* generic errors checked at ecore_test_efl_net_ip_address_ipv4_manual_fail */
809 809
810 TRAP_ERRORS_BEGIN(eina_safety, ERR, "safety check failed: rw_slice.len != address.len is true"); 810 TRAP_ERRORS_BEGIN(eina_safety, ERR, "safety check failed: rw_slice.len != address.len is true");
811 o = efl_add(EFL_NET_IP_ADDRESS_CLASS, NULL, 811 o = efl_add_ref(EFL_NET_IP_ADDRESS_CLASS, NULL,
812 efl_net_ip_address_family_set(efl_added, AF_INET6), 812 efl_net_ip_address_family_set(efl_added, AF_INET6),
813 efl_net_ip_address_set(efl_added, wrong_slice)); 813 efl_net_ip_address_set(efl_added, wrong_slice));
814 _ipv6_check(o, &addr); 814 _ipv6_check(o, &addr);
815 efl_del(o); 815 efl_unref(o);
816 TRAP_ERRORS_FINISH(1); 816 TRAP_ERRORS_FINISH(1);
817 817
818 addr.sin6_port = htons(12345); 818 addr.sin6_port = htons(12345);
819 _ipv6_set(&addr, 0, 0, 0, 0, 0, 0, 0, 1); 819 _ipv6_set(&addr, 0, 0, 0, 0, 0, 0, 0, 1);
820 o = efl_add(EFL_NET_IP_ADDRESS_CLASS, NULL, 820 o = efl_add_ref(EFL_NET_IP_ADDRESS_CLASS, NULL,
821 efl_net_ip_address_family_set(efl_added, AF_INET6), 821 efl_net_ip_address_family_set(efl_added, AF_INET6),
822 efl_net_ip_address_port_set(efl_added, ntohs(addr.sin6_port)), 822 efl_net_ip_address_port_set(efl_added, ntohs(addr.sin6_port)),
823 efl_net_ip_address_set(efl_added, slice)); 823 efl_net_ip_address_set(efl_added, slice));
@@ -847,7 +847,7 @@ START_TEST(ecore_test_efl_net_ip_address_ipv6_manual_fail)
847 efl_net_ip_address_set(o, slice); 847 efl_net_ip_address_set(o, slice);
848 TRAP_ERRORS_FINISH(1); 848 TRAP_ERRORS_FINISH(1);
849 849
850 efl_del(o); 850 efl_unref(o);
851 851
852 ecore_con_shutdown(); 852 ecore_con_shutdown();
853} 853}
@@ -869,7 +869,7 @@ START_TEST(ecore_test_efl_net_ip_address_ipv6_create_ok)
869 ntohs(addr.sin6_port), 869 ntohs(addr.sin6_port),
870 slice); 870 slice);
871 _ipv6_check(o, &addr); 871 _ipv6_check(o, &addr);
872 efl_del(o); 872 efl_unref(o);
873 873
874 addr.sin6_port = htons(8081); 874 addr.sin6_port = htons(8081);
875 _ipv6_set(&addr, 0, 0, 0, 0, 0, 0, 0, 0); 875 _ipv6_set(&addr, 0, 0, 0, 0, 0, 0, 0, 0);
@@ -877,7 +877,7 @@ START_TEST(ecore_test_efl_net_ip_address_ipv6_create_ok)
877 ntohs(addr.sin6_port), 877 ntohs(addr.sin6_port),
878 slice); 878 slice);
879 _ipv6_check(o, &addr); 879 _ipv6_check(o, &addr);
880 efl_del(o); 880 efl_unref(o);
881 881
882 addr.sin6_port = htons(0); 882 addr.sin6_port = htons(0);
883 _ipv6_set(&addr, 0, 0, 0, 0, 0, 0, 0, 1); 883 _ipv6_set(&addr, 0, 0, 0, 0, 0, 0, 0, 1);
@@ -885,7 +885,7 @@ START_TEST(ecore_test_efl_net_ip_address_ipv6_create_ok)
885 ntohs(addr.sin6_port), 885 ntohs(addr.sin6_port),
886 slice); 886 slice);
887 _ipv6_check(o, &addr); 887 _ipv6_check(o, &addr);
888 efl_del(o); 888 efl_unref(o);
889 889
890 ecore_con_shutdown(); 890 ecore_con_shutdown();
891} 891}
@@ -905,14 +905,14 @@ START_TEST(ecore_test_efl_net_ip_address_ipv6_create_sockaddr_ok)
905 o = efl_net_ip_address_create_sockaddr(EFL_NET_IP_ADDRESS_CLASS, &addr); 905 o = efl_net_ip_address_create_sockaddr(EFL_NET_IP_ADDRESS_CLASS, &addr);
906 ck_assert_ptr_ne(&addr, efl_net_ip_address_sockaddr_get(o)); 906 ck_assert_ptr_ne(&addr, efl_net_ip_address_sockaddr_get(o));
907 _ipv6_check(o, &addr); 907 _ipv6_check(o, &addr);
908 efl_del(o); 908 efl_unref(o);
909 909
910 addr.sin6_port = htons(0); 910 addr.sin6_port = htons(0);
911 _ipv6_set(&addr, 0, 0, 0, 0, 0, 0, 0, 0); 911 _ipv6_set(&addr, 0, 0, 0, 0, 0, 0, 0, 0);
912 o = efl_net_ip_address_create_sockaddr(EFL_NET_IP_ADDRESS_CLASS, &addr); 912 o = efl_net_ip_address_create_sockaddr(EFL_NET_IP_ADDRESS_CLASS, &addr);
913 ck_assert_ptr_ne(&addr, efl_net_ip_address_sockaddr_get(o)); 913 ck_assert_ptr_ne(&addr, efl_net_ip_address_sockaddr_get(o));
914 _ipv6_check(o, &addr); 914 _ipv6_check(o, &addr);
915 efl_del(o); 915 efl_unref(o);
916 916
917 ecore_con_shutdown(); 917 ecore_con_shutdown();
918} 918}
@@ -927,86 +927,86 @@ START_TEST(ecore_test_efl_net_ip_address_ipv6_parse_ok)
927 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[::1]:12345"); 927 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[::1]:12345");
928 ck_assert_ptr_ne(o, NULL); 928 ck_assert_ptr_ne(o, NULL);
929 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::1]:12345"); 929 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::1]:12345");
930 efl_del(o); 930 efl_unref(o);
931 931
932 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[::1]:0"); 932 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[::1]:0");
933 ck_assert_ptr_ne(o, NULL); 933 ck_assert_ptr_ne(o, NULL);
934 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::1]"); 934 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::1]");
935 efl_del(o); 935 efl_unref(o);
936 936
937 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[::1]"); 937 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[::1]");
938 ck_assert_ptr_ne(o, NULL); 938 ck_assert_ptr_ne(o, NULL);
939 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::1]"); 939 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::1]");
940 efl_del(o); 940 efl_unref(o);
941 941
942 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "::1"); 942 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "::1");
943 ck_assert_ptr_ne(o, NULL); 943 ck_assert_ptr_ne(o, NULL);
944 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::1]"); 944 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::1]");
945 efl_del(o); 945 efl_unref(o);
946 946
947 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[::]:12345"); 947 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[::]:12345");
948 ck_assert_ptr_ne(o, NULL); 948 ck_assert_ptr_ne(o, NULL);
949 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::]:12345"); 949 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::]:12345");
950 efl_del(o); 950 efl_unref(o);
951 951
952 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[::]:0"); 952 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[::]:0");
953 ck_assert_ptr_ne(o, NULL); 953 ck_assert_ptr_ne(o, NULL);
954 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::]"); 954 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::]");
955 efl_del(o); 955 efl_unref(o);
956 956
957 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[::]"); 957 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[::]");
958 ck_assert_ptr_ne(o, NULL); 958 ck_assert_ptr_ne(o, NULL);
959 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::]"); 959 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::]");
960 efl_del(o); 960 efl_unref(o);
961 961
962 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "::"); 962 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "::");
963 ck_assert_ptr_ne(o, NULL); 963 ck_assert_ptr_ne(o, NULL);
964 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::]"); 964 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::]");
965 efl_del(o); 965 efl_unref(o);
966 966
967 /* IPv4 Mapped */ 967 /* IPv4 Mapped */
968 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[::ffff:192.168.0.1]:12345"); 968 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[::ffff:192.168.0.1]:12345");
969 ck_assert_ptr_ne(o, NULL); 969 ck_assert_ptr_ne(o, NULL);
970 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::ffff:192.168.0.1]:12345"); 970 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::ffff:192.168.0.1]:12345");
971 efl_del(o); 971 efl_unref(o);
972 972
973 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[::ffff:192.168.0.1]"); 973 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[::ffff:192.168.0.1]");
974 ck_assert_ptr_ne(o, NULL); 974 ck_assert_ptr_ne(o, NULL);
975 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::ffff:192.168.0.1]"); 975 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::ffff:192.168.0.1]");
976 efl_del(o); 976 efl_unref(o);
977 977
978 /* IPv4 Compatible */ 978 /* IPv4 Compatible */
979 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[::192.168.0.1]:12345"); 979 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[::192.168.0.1]:12345");
980 ck_assert_ptr_ne(o, NULL); 980 ck_assert_ptr_ne(o, NULL);
981 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::192.168.0.1]:12345"); 981 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::192.168.0.1]:12345");
982 efl_del(o); 982 efl_unref(o);
983 983
984 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[::192.168.0.1]"); 984 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[::192.168.0.1]");
985 ck_assert_ptr_ne(o, NULL); 985 ck_assert_ptr_ne(o, NULL);
986 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::192.168.0.1]"); 986 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[::192.168.0.1]");
987 efl_del(o); 987 efl_unref(o);
988 988
989 /* Link Local */ 989 /* Link Local */
990 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[fe80::1]:12345"); 990 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[fe80::1]:12345");
991 ck_assert_ptr_ne(o, NULL); 991 ck_assert_ptr_ne(o, NULL);
992 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[fe80::1]:12345"); 992 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[fe80::1]:12345");
993 efl_del(o); 993 efl_unref(o);
994 994
995 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[fe80::1]"); 995 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[fe80::1]");
996 ck_assert_ptr_ne(o, NULL); 996 ck_assert_ptr_ne(o, NULL);
997 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[fe80::1]"); 997 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[fe80::1]");
998 efl_del(o); 998 efl_unref(o);
999 999
1000 /* Site Local */ 1000 /* Site Local */
1001 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[fc00::1]:12345"); 1001 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[fc00::1]:12345");
1002 ck_assert_ptr_ne(o, NULL); 1002 ck_assert_ptr_ne(o, NULL);
1003 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[fc00::1]:12345"); 1003 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[fc00::1]:12345");
1004 efl_del(o); 1004 efl_unref(o);
1005 1005
1006 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[fc00::1]"); 1006 o = efl_net_ip_address_parse(EFL_NET_IP_ADDRESS_CLASS, "[fc00::1]");
1007 ck_assert_ptr_ne(o, NULL); 1007 ck_assert_ptr_ne(o, NULL);
1008 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[fc00::1]"); 1008 ck_assert_str_eq(efl_net_ip_address_string_get(o), "[fc00::1]");
1009 efl_del(o); 1009 efl_unref(o);
1010 1010
1011 ecore_con_shutdown(); 1011 ecore_con_shutdown();
1012} 1012}
@@ -1253,7 +1253,7 @@ START_TEST(ecore_test_efl_net_ip_address_ipv6_checks)
1253 ck_assert_int_eq(efl_net_ip_address_ipv6_local_link_check(o), IN6_IS_ADDR_LINKLOCAL(ia)); 1253 ck_assert_int_eq(efl_net_ip_address_ipv6_local_link_check(o), IN6_IS_ADDR_LINKLOCAL(ia));
1254 ck_assert_int_eq(efl_net_ip_address_ipv6_local_site_check(o), IN6_IS_ADDR_SITELOCAL(ia)); 1254 ck_assert_int_eq(efl_net_ip_address_ipv6_local_site_check(o), IN6_IS_ADDR_SITELOCAL(ia));
1255 1255
1256 efl_del(o); 1256 efl_unref(o);
1257 } 1257 }
1258 1258
1259 ecore_con_shutdown(); 1259 ecore_con_shutdown();
diff --git a/src/tests/efl/efl_test_model_composite.c b/src/tests/efl/efl_test_model_composite.c
index 175adee..9f29468 100644
--- a/src/tests/efl/efl_test_model_composite.c
+++ b/src/tests/efl/efl_test_model_composite.c
@@ -183,7 +183,7 @@ START_TEST(efl_test_model_composite_boolean)
183 183
184 eina_value_setup(&v, EINA_VALUE_TYPE_INT); 184 eina_value_setup(&v, EINA_VALUE_TYPE_INT);
185 185
186 base_model = efl_add(EFL_MODEL_ITEM_CLASS, NULL); 186 base_model = efl_add_ref(EFL_MODEL_ITEM_CLASS, NULL);
187 ck_assert(!!base_model); 187 ck_assert(!!base_model);
188 188
189 for (i = 0; i < child_number; ++i) 189 for (i = 0; i < child_number; ++i)
@@ -194,7 +194,7 @@ START_TEST(efl_test_model_composite_boolean)
194 efl_model_property_set(child, "test_p_int", &v); 194 efl_model_property_set(child, "test_p_int", &v);
195 } 195 }
196 196
197 model = efl_add(EFL_MODEL_COMPOSITE_BOOLEAN_CLASS, NULL, 197 model = efl_add_ref(EFL_MODEL_COMPOSITE_BOOLEAN_CLASS, NULL,
198 efl_ui_view_model_set(efl_added, base_model), 198 efl_ui_view_model_set(efl_added, base_model),
199 efl_model_composite_boolean_property_add(efl_added, "test_p_true", EINA_TRUE), 199 efl_model_composite_boolean_property_add(efl_added, "test_p_true", EINA_TRUE),
200 efl_model_composite_boolean_property_add(efl_added, "test_p_false", EINA_FALSE)); 200 efl_model_composite_boolean_property_add(efl_added, "test_p_false", EINA_FALSE));
@@ -226,7 +226,7 @@ START_TEST(efl_test_model_composite_selection)
226 226
227 eina_value_setup(&v, EINA_VALUE_TYPE_INT); 227 eina_value_setup(&v, EINA_VALUE_TYPE_INT);
228 228
229 base_model = efl_add(EFL_MODEL_ITEM_CLASS, NULL); 229 base_model = efl_add_ref(EFL_MODEL_ITEM_CLASS, NULL);
230 ck_assert(!!base_model); 230 ck_assert(!!base_model);
231 231
232 for (i = 0; i < child_number; ++i) 232 for (i = 0; i < child_number; ++i)
@@ -237,7 +237,7 @@ START_TEST(efl_test_model_composite_selection)
237 efl_model_property_set(child, "test_p_int", &v); 237 efl_model_property_set(child, "test_p_int", &v);
238 } 238 }
239 239
240 model = efl_add(EFL_MODEL_COMPOSITE_SELECTION_CLASS, NULL, 240 model = efl_add_ref(EFL_MODEL_COMPOSITE_SELECTION_CLASS, NULL,
241 efl_ui_view_model_set(efl_added, base_model)); 241 efl_ui_view_model_set(efl_added, base_model));
242 ck_assert(!!model); 242 ck_assert(!!model);
243 efl_model_composite_selection_select(model, 2); 243 efl_model_composite_selection_select(model, 2);
diff --git a/src/tests/efl/efl_test_model_container.c b/src/tests/efl/efl_test_model_container.c
index bfd1984..127e250 100644
--- a/src/tests/efl/efl_test_model_container.c
+++ b/src/tests/efl/efl_test_model_container.c
@@ -130,7 +130,7 @@ START_TEST(efl_test_model_container_values)
130 cmp_str[i] = strdup(base_str[i]); 130 cmp_str[i] = strdup(base_str[i]);
131 } 131 }
132 132
133 model = efl_add(EFL_MODEL_CONTAINER_CLASS, NULL); 133 model = efl_add_ref(EFL_MODEL_CONTAINER_CLASS, NULL);
134 134
135 efl_model_container_child_property_add(model, "test_p_int", EINA_VALUE_TYPE_INT, 135 efl_model_container_child_property_add(model, "test_p_int", EINA_VALUE_TYPE_INT,
136 eina_carray_iterator_new((void**)cmp_int)); 136 eina_carray_iterator_new((void**)cmp_int));
diff --git a/src/tests/efl_mono/libefl_mono_native_test.c b/src/tests/efl_mono/libefl_mono_native_test.c
index 19fe984..8981a04 100644
--- a/src/tests/efl_mono/libefl_mono_native_test.c
+++ b/src/tests/efl_mono/libefl_mono_native_test.c
@@ -85,7 +85,7 @@ char **_new_str_ref(const char* str)
85static 85static
86Test_Numberwrapper *_new_obj(int n) 86Test_Numberwrapper *_new_obj(int n)
87{ 87{
88 return efl_add(TEST_NUMBERWRAPPER_CLASS, NULL, test_numberwrapper_number_set(efl_added, n)); 88 return efl_add_ref(TEST_NUMBERWRAPPER_CLASS, NULL, test_numberwrapper_number_set(efl_added, n));
89} 89}
90 90
91static 91static
diff --git a/src/tests/eio/eio_test_sentry.c b/src/tests/eio/eio_test_sentry.c
index 98e4863..0ae402a 100644
--- a/src/tests/eio/eio_test_sentry.c
+++ b/src/tests/eio/eio_test_sentry.c
@@ -146,7 +146,7 @@ START_TEST(eio_test_sentry_add_and_remove)
146 usleep(500000); 146 usleep(500000);
147 147
148 //monitor directory 148 //monitor directory
149 sentry = efl_add(EIO_SENTRY_CLASS, NULL); 149 sentry = efl_add_ref(EIO_SENTRY_CLASS, NULL);
150 fail_if(!eio_sentry_add(sentry, filename)); 150 fail_if(!eio_sentry_add(sentry, filename));
151 151
152 usleep(500000); 152 usleep(500000);
@@ -172,7 +172,7 @@ START_TEST(eio_test_sentry_add_remove_add)
172 usleep(500000); 172 usleep(500000);
173 173
174 //monitor directory 174 //monitor directory
175 sentry = efl_add(EIO_SENTRY_CLASS, NULL); 175 sentry = efl_add_ref(EIO_SENTRY_CLASS, NULL);
176 fail_if(!eio_sentry_add(sentry, filename)); 176 fail_if(!eio_sentry_add(sentry, filename));
177 eio_sentry_remove(sentry, filename); 177 eio_sentry_remove(sentry, filename);
178 178
@@ -202,7 +202,7 @@ START_TEST(eio_test_sentry_add_add_remove_remove)
202 //sleep to avoid catching event generated by above manipulations 202 //sleep to avoid catching event generated by above manipulations
203 usleep(500000); 203 usleep(500000);
204 204
205 sentry = efl_add(EIO_SENTRY_CLASS, NULL); 205 sentry = efl_add_ref(EIO_SENTRY_CLASS, NULL);
206 206
207 //monitor directory 207 //monitor directory
208 fail_if(!eio_sentry_add(sentry, filename1)); 208 fail_if(!eio_sentry_add(sentry, filename1));
@@ -232,7 +232,7 @@ START_TEST(eio_test_sentry_directory_file_created_notify)
232 Eo* sentry; 232 Eo* sentry;
233 233
234 filename = eina_stringshare_printf("%s/eio_test_sentry_directory_file_created_notify", dirname); 234 filename = eina_stringshare_printf("%s/eio_test_sentry_directory_file_created_notify", dirname);
235 sentry = efl_add(EIO_SENTRY_CLASS, NULL); 235 sentry = efl_add_ref(EIO_SENTRY_CLASS, NULL);
236 236
237 //sleep to avoid catching event generated by above manipulations 237 //sleep to avoid catching event generated by above manipulations
238 usleep(500000); 238 usleep(500000);
@@ -259,7 +259,7 @@ START_TEST(eio_test_sentry_directory_file_deleted_notify)
259 259
260 filename = eina_stringshare_printf("%s/eio_test_sentry_directory_file_deleted_notify", dirname); 260 filename = eina_stringshare_printf("%s/eio_test_sentry_directory_file_deleted_notify", dirname);
261 _create_file((void*)filename); 261 _create_file((void*)filename);
262 sentry = efl_add(EIO_SENTRY_CLASS, NULL); 262 sentry = efl_add_ref(EIO_SENTRY_CLASS, NULL);
263 263
264 //sleep to avoid catching event generated by above manipulations 264 //sleep to avoid catching event generated by above manipulations
265 usleep(500000); 265 usleep(500000);
@@ -286,7 +286,7 @@ START_TEST(eio_test_sentry_directory_file_modified_notify)
286 286
287 filename = eina_stringshare_printf("%s/eio_test_sentry_directory_file_modified_notify", dirname); 287 filename = eina_stringshare_printf("%s/eio_test_sentry_directory_file_modified_notify", dirname);
288 _create_file((void*)filename); 288 _create_file((void*)filename);
289 sentry = efl_add(EIO_SENTRY_CLASS, NULL); 289 sentry = efl_add_ref(EIO_SENTRY_CLASS, NULL);
290 290
291 //sleep to avoid catching event generated by above manipulations 291 //sleep to avoid catching event generated by above manipulations
292 usleep(500000); 292 usleep(500000);
@@ -314,7 +314,7 @@ START_TEST(eio_test_sentry_directory_file_closed_notify)
314 314
315 filename = eina_stringshare_printf("%s/eio_test_sentry_directory_file_closed_notify", dirname); 315 filename = eina_stringshare_printf("%s/eio_test_sentry_directory_file_closed_notify", dirname);
316 _create_file((void*)filename); 316 _create_file((void*)filename);
317 sentry = efl_add(EIO_SENTRY_CLASS, NULL); 317 sentry = efl_add_ref(EIO_SENTRY_CLASS, NULL);
318 318
319 //sleep to avoid catching event generated by above manipulations 319 //sleep to avoid catching event generated by above manipulations
320 usleep(500000); 320 usleep(500000);
@@ -339,7 +339,7 @@ START_TEST(eio_test_sentry_directory_directory_created_notify)
339 Eo *sentry; 339 Eo *sentry;
340 340
341 filename = eina_stringshare_printf("%s/eio_test_sentry_directory_directory_created_notify", dirname); 341 filename = eina_stringshare_printf("%s/eio_test_sentry_directory_directory_created_notify", dirname);
342 sentry = efl_add(EIO_SENTRY_CLASS, NULL); 342 sentry = efl_add_ref(EIO_SENTRY_CLASS, NULL);
343 343
344 //sleep to avoid catching event generated by above manipulations 344 //sleep to avoid catching event generated by above manipulations
345 usleep(500000); 345 usleep(500000);
@@ -366,7 +366,7 @@ START_TEST(eio_test_sentry_directory_directory_deleted_notify)
366 366
367 filename = eina_stringshare_printf("%s/eio_test_sentry_directory_directory_deleted_notify", dirname); 367 filename = eina_stringshare_printf("%s/eio_test_sentry_directory_directory_deleted_notify", dirname);
368 _create_directory((void*)filename); 368 _create_directory((void*)filename);
369 sentry = efl_add(EIO_SENTRY_CLASS, NULL); 369 sentry = efl_add_ref(EIO_SENTRY_CLASS, NULL);
370 370
371 //sleep to avoid catching event generated by above manipulations 371 //sleep to avoid catching event generated by above manipulations
372 usleep(500000); 372 usleep(500000);
@@ -393,7 +393,7 @@ START_TEST(eio_test_sentry_directory_directory_modified_notify)
393 393
394 filename = eina_stringshare_printf("%s/eio_test_sentry_directory_directory_modified_notify", dirname); 394 filename = eina_stringshare_printf("%s/eio_test_sentry_directory_directory_modified_notify", dirname);
395 _create_directory((void*)filename); 395 _create_directory((void*)filename);
396 sentry = efl_add(EIO_SENTRY_CLASS, NULL); 396 sentry = efl_add_ref(EIO_SENTRY_CLASS, NULL);
397 397
398 //sleep to avoid catching event generated by above manipulations 398 //sleep to avoid catching event generated by above manipulations
399 usleep(500000); 399 usleep(500000);
@@ -415,7 +415,7 @@ END_TEST
415START_TEST(eio_test_sentry_directory_directory_self_deleted_notify) 415START_TEST(eio_test_sentry_directory_directory_self_deleted_notify)
416{ 416{
417 Eina_Tmpstr *dirname = _common_init(); 417 Eina_Tmpstr *dirname = _common_init();
418 Eo *sentry = efl_add(EIO_SENTRY_CLASS, NULL); 418 Eo *sentry = efl_add_ref(EIO_SENTRY_CLASS, NULL);
419 419
420 //sleep to avoid catching event generated by above manipulations 420 //sleep to avoid catching event generated by above manipulations
421 usleep(500000); 421 usleep(500000);
@@ -444,7 +444,7 @@ START_TEST(eio_test_sentry_file_file_modified_notify)
444 444
445 filename = eina_stringshare_printf("%s/filecreated", dirname); 445 filename = eina_stringshare_printf("%s/filecreated", dirname);
446 _create_file((void*)filename); 446 _create_file((void*)filename);
447 sentry = efl_add(EIO_SENTRY_CLASS, NULL); 447 sentry = efl_add_ref(EIO_SENTRY_CLASS, NULL);
448 448
449 //sleep to avoid catching event generated by above manipulations 449 //sleep to avoid catching event generated by above manipulations
450 usleep(500000); 450 usleep(500000);
@@ -472,7 +472,7 @@ START_TEST(eio_test_sentry_file_file_attrib_modified_notify)
472 472
473 filename = eina_stringshare_printf("%s/eio_test_sentry_file_file_attrib_modified_notify", dirname); 473 filename = eina_stringshare_printf("%s/eio_test_sentry_file_file_attrib_modified_notify", dirname);
474 _create_file((void*)filename); 474 _create_file((void*)filename);
475 sentry = efl_add(EIO_SENTRY_CLASS, NULL); 475 sentry = efl_add_ref(EIO_SENTRY_CLASS, NULL);
476 476
477 //sleep to avoid catching event generated by above manipulations 477 //sleep to avoid catching event generated by above manipulations
478 usleep(500000); 478 usleep(500000);
@@ -500,7 +500,7 @@ START_TEST(eio_test_sentry_file_file_closed_notify)
500 500
501 filename = eina_stringshare_printf("%s/eio_test_sentry_file_file_closed_notify", dirname); 501 filename = eina_stringshare_printf("%s/eio_test_sentry_file_file_closed_notify", dirname);
502 _create_file((void*)filename); 502 _create_file((void*)filename);
503 sentry = efl_add(EIO_SENTRY_CLASS, NULL); 503 sentry = efl_add_ref(EIO_SENTRY_CLASS, NULL);
504 504
505 //sleep to avoid catching event generated by above manipulations 505 //sleep to avoid catching event generated by above manipulations
506 usleep(500000); 506 usleep(500000);
@@ -526,7 +526,7 @@ START_TEST(eio_test_sentry_file_file_self_deleted_notify)
526 526
527 filename = eina_stringshare_printf("%s/eio_test_sentry_file_file_self_deleted_notify", dirname); 527 filename = eina_stringshare_printf("%s/eio_test_sentry_file_file_self_deleted_notify", dirname);
528 _create_file((void*)filename); 528 _create_file((void*)filename);
529 sentry = efl_add(EIO_SENTRY_CLASS, NULL); 529 sentry = efl_add_ref(EIO_SENTRY_CLASS, NULL);
530 530
531 //sleep to avoid catching event generated by above manipulations 531 //sleep to avoid catching event generated by above manipulations
532 usleep(500000); 532 usleep(500000);
@@ -555,7 +555,7 @@ START_TEST(eio_test_sentry_two_monitors_one_event)
555 555
556 eina_file_mkdtemp("checkFileCreationXXXXXX", &dirname2); 556 eina_file_mkdtemp("checkFileCreationXXXXXX", &dirname2);
557 filename = eina_stringshare_printf("%s/eio_test_sentry_two_monitors_one_event", dirname); 557 filename = eina_stringshare_printf("%s/eio_test_sentry_two_monitors_one_event", dirname);
558 sentry = efl_add(EIO_SENTRY_CLASS, NULL); 558 sentry = efl_add_ref(EIO_SENTRY_CLASS, NULL);
559 559
560 //sleep to avoid catching event generated by above manipulations 560 //sleep to avoid catching event generated by above manipulations
561 usleep(500000); 561 usleep(500000);
@@ -587,7 +587,7 @@ START_TEST(eio_test_sentry_two_monitors_one_removed_one_event)
587 587
588 eina_file_mkdtemp("checkFileCreationXXXXXX", &dirname2); 588 eina_file_mkdtemp("checkFileCreationXXXXXX", &dirname2);
589 filename = eina_stringshare_printf("%s/eio_test_sentry_two_monitors_one_removed", dirname); 589 filename = eina_stringshare_printf("%s/eio_test_sentry_two_monitors_one_removed", dirname);
590 sentry = efl_add(EIO_SENTRY_CLASS, NULL); 590 sentry = efl_add_ref(EIO_SENTRY_CLASS, NULL);
591 591
592 //sleep to avoid catching event generated by above manipulations 592 //sleep to avoid catching event generated by above manipulations
593 usleep(500000); 593 usleep(500000);
@@ -624,7 +624,7 @@ START_TEST(eio_test_sentry_two_monitors_one_removed_no_event)
624 624
625 eina_file_mkdtemp("checkFileCreationXXXXXX", &dirname2); 625 eina_file_mkdtemp("checkFileCreationXXXXXX", &dirname2);
626 filename = eina_stringshare_printf("%s/eio_test_sentry_two_monitors_one_removed", dirname); 626 filename = eina_stringshare_printf("%s/eio_test_sentry_two_monitors_one_removed", dirname);
627 sentry = efl_add(EIO_SENTRY_CLASS, NULL); 627 sentry = efl_add_ref(EIO_SENTRY_CLASS, NULL);
628 628
629 //sleep to avoid catching event generated by above manipulations 629 //sleep to avoid catching event generated by above manipulations
630 usleep(500000); 630 usleep(500000);
@@ -658,7 +658,7 @@ START_TEST(eio_test_sentry_two_files_in_same_directory)
658 filename2 = eina_stringshare_printf("%s/eio_test_sentry_two_files_in_same_directory_2", dirname); 658 filename2 = eina_stringshare_printf("%s/eio_test_sentry_two_files_in_same_directory_2", dirname);
659 _create_file((void*)filename); 659 _create_file((void*)filename);
660 _create_file((void*)filename2); 660 _create_file((void*)filename2);
661 sentry = efl_add(EIO_SENTRY_CLASS, NULL); 661 sentry = efl_add_ref(EIO_SENTRY_CLASS, NULL);
662 662
663 //sleep to avoid catching event generated by above manipulations 663 //sleep to avoid catching event generated by above manipulations
664 usleep(500000); 664 usleep(500000);
@@ -691,7 +691,7 @@ START_TEST(eio_test_sentry_two_files_in_same_directory_one_removed)
691 filename2 = eina_stringshare_printf("%s/eio_test_sentry_two_files_in_same_directory_one_removed_2", dirname); 691 filename2 = eina_stringshare_printf("%s/eio_test_sentry_two_files_in_same_directory_one_removed_2", dirname);
692 _create_file((void*)filename); 692 _create_file((void*)filename);
693 _create_file((void*)filename2); 693 _create_file((void*)filename2);
694 sentry = efl_add(EIO_SENTRY_CLASS, NULL); 694 sentry = efl_add_ref(EIO_SENTRY_CLASS, NULL);
695 695
696 //sleep to avoid catching event generated by above manipulations 696 //sleep to avoid catching event generated by above manipulations
697 usleep(500000); 697 usleep(500000);
diff --git a/src/tests/elementary/elm_test_atspi.c b/src/tests/elementary/elm_test_atspi.c
index 61c9c4e..0afddf3 100644
--- a/src/tests/elementary/elm_test_atspi.c
+++ b/src/tests/elementary/elm_test_atspi.c
@@ -31,7 +31,7 @@ START_TEST (test_efl_access_app_obj_name_get)
31 char *args[] = { "exe" }; 31 char *args[] = { "exe" };
32 elm_init(1, args); 32 elm_init(1, args);
33 33
34 Eo* root = efl_add(ELM_ATSPI_APP_OBJECT_CLASS, NULL); 34 Eo* root = efl_add_ref(ELM_ATSPI_APP_OBJECT_CLASS, NULL);
35 35
36 ck_assert(root != NULL); 36 ck_assert(root != NULL);
37 37
@@ -106,7 +106,7 @@ START_TEST (test_efl_access_role_get)
106 char *args[] = { "exe" }; 106 char *args[] = { "exe" };
107 elm_init(1, args); 107 elm_init(1, args);
108 108
109 Eo* root = efl_add(ELM_ATSPI_APP_OBJECT_CLASS, NULL); 109 Eo* root = efl_add_ref(ELM_ATSPI_APP_OBJECT_CLASS, NULL);
110 110
111 Efl_Access_Role role; 111 Efl_Access_Role role;
112 112
@@ -147,7 +147,7 @@ START_TEST (test_efl_access_role_name_get)
147 char *args[] = { "exe" }; 147 char *args[] = { "exe" };
148 elm_init(1, args); 148 elm_init(1, args);
149 149
150 Eo* root = efl_add(ELM_ATSPI_APP_OBJECT_CLASS, NULL); 150 Eo* root = efl_add_ref(ELM_ATSPI_APP_OBJECT_CLASS, NULL);
151 151
152 const char *ret = NULL; 152 const char *ret = NULL;
153 153
@@ -165,7 +165,7 @@ START_TEST (test_efl_access_localized_role_name_get)
165 char *args[] = { "exe" }; 165 char *args[] = { "exe" };
166 elm_init(1, args); 166 elm_init(1, args);
167 167
168 Eo* root = efl_add(ELM_ATSPI_APP_OBJECT_CLASS, NULL); 168 Eo* root = efl_add_ref(ELM_ATSPI_APP_OBJECT_CLASS, NULL);
169 169
170 const char *ret = NULL; 170 const char *ret = NULL;
171 171
@@ -183,7 +183,7 @@ START_TEST (test_efl_access_description_set)
183 char *args[] = { "exe" }; 183 char *args[] = { "exe" };
184 elm_init(1, args); 184 elm_init(1, args);
185 185
186 Eo* root = efl_add(ELM_ATSPI_APP_OBJECT_CLASS, NULL); 186 Eo* root = efl_add_ref(ELM_ATSPI_APP_OBJECT_CLASS, NULL);
187 187
188 const char *ret = NULL; 188 const char *ret = NULL;
189 189
@@ -231,7 +231,7 @@ START_TEST (test_efl_access_children_and_parent)
231 elm_init(1, args); 231 elm_init(1, args);
232 232
233 generate_app(); 233 generate_app();
234 Eo* root = efl_add(ELM_ATSPI_APP_OBJECT_CLASS, NULL); 234 Eo* root = efl_add_ref(ELM_ATSPI_APP_OBJECT_CLASS, NULL);
235 235
236 Eina_List *child_list = NULL; 236 Eina_List *child_list = NULL;
237 237
@@ -259,7 +259,7 @@ START_TEST (test_efl_access_children_and_parent2)
259 elm_init(1, args); 259 elm_init(1, args);
260 260
261 generate_app(); 261 generate_app();
262 Eo* root = efl_add(ELM_ATSPI_APP_OBJECT_CLASS, NULL); 262 Eo* root = efl_add_ref(ELM_ATSPI_APP_OBJECT_CLASS, NULL);
263 263
264 Eo *win = NULL; 264 Eo *win = NULL;
265 265
diff --git a/src/tests/elementary/elm_test_config.c b/src/tests/elementary/elm_test_config.c
index 12813b0..c7593bd 100644
--- a/src/tests/elementary/elm_test_config.c
+++ b/src/tests/elementary/elm_test_config.c
@@ -155,14 +155,14 @@ START_TEST (elm_config_win)
155 Eo *cfg = efl_provider_find(efl_main_loop_get(), EFL_CONFIG_INTERFACE); 155 Eo *cfg = efl_provider_find(efl_main_loop_get(), EFL_CONFIG_INTERFACE);
156 fail_if(!cfg); 156 fail_if(!cfg);
157 157
158 Eo *win = efl_add(EFL_UI_WIN_CLASS, NULL); 158 Eo *win = efl_add_ref(EFL_UI_WIN_CLASS, NULL);
159 Eo *cfg2 = efl_provider_find(win, EFL_CONFIG_INTERFACE); 159 Eo *cfg2 = efl_provider_find(win, EFL_CONFIG_INTERFACE);
160 fail_if(cfg != cfg2); 160 fail_if(cfg != cfg2);
161 161
162 elm_config_cache_flush_interval_set(42); 162 elm_config_cache_flush_interval_set(42);
163 fail_if(efl_config_int_get(win, "cache_flush_interval") != 42); 163 fail_if(efl_config_int_get(win, "cache_flush_interval") != 42);
164 164
165 efl_del(win); 165 efl_unref(win);
166 elm_shutdown(); 166 elm_shutdown();
167} 167}
168END_TEST 168END_TEST
diff --git a/src/tests/elementary/elm_test_focus.c b/src/tests/elementary/elm_test_focus.c
index b2adc25..405b2fc 100644
--- a/src/tests/elementary/elm_test_focus.c
+++ b/src/tests/elementary/elm_test_focus.c
@@ -4,10 +4,10 @@ START_TEST(focus_unregister_twice)
4{ 4{
5 char *args[] = { "exe" }; 5 char *args[] = { "exe" };
6 elm_init(1, args); 6 elm_init(1, args);
7 Efl_Ui_Focus_Object *r1 = efl_add(FOCUS_TEST_CLASS, NULL); 7 Efl_Ui_Focus_Object *r1 = efl_add_ref(FOCUS_TEST_CLASS, NULL);
8 Efl_Ui_Focus_Object *r2 = efl_add(FOCUS_TEST_CLASS, NULL); 8 Efl_Ui_Focus_Object *r2 = efl_add_ref(FOCUS_TEST_CLASS, NULL);
9 9
10 Efl_Ui_Focus_Manager *m = efl_add(EFL_UI_FOCUS_MANAGER_CALC_CLASS, NULL, 10 Efl_Ui_Focus_Manager *m = efl_add_ref(EFL_UI_FOCUS_MANAGER_CALC_CLASS, NULL,
11 efl_ui_focus_manager_root_set(efl_added, r1) 11 efl_ui_focus_manager_root_set(efl_added, r1)
12 ); 12 );
13 13
@@ -17,9 +17,9 @@ START_TEST(focus_unregister_twice)
17 efl_ui_focus_manager_calc_unregister(m, r1); 17 efl_ui_focus_manager_calc_unregister(m, r1);
18 efl_ui_focus_manager_calc_unregister(m, r1); 18 efl_ui_focus_manager_calc_unregister(m, r1);
19 19
20 efl_del(r2); 20 efl_unref(r2);
21 efl_del(r1); 21 efl_unref(r1);
22 efl_del(m); 22 efl_unref(m);
23 23
24 elm_shutdown(); 24 elm_shutdown();
25} 25}
@@ -33,15 +33,15 @@ START_TEST(focus_register_twice)
33 Efl_Ui_Focus_Object *r1 = elm_focus_test_object_new("r1", 0, 0, 10, 10); 33 Efl_Ui_Focus_Object *r1 = elm_focus_test_object_new("r1", 0, 0, 10, 10);
34 Efl_Ui_Focus_Object *r2 = elm_focus_test_object_new("r2", 0, 10, 10, 10); 34 Efl_Ui_Focus_Object *r2 = elm_focus_test_object_new("r2", 0, 10, 10, 10);
35 35
36 Efl_Ui_Focus_Manager *m = efl_add(EFL_UI_FOCUS_MANAGER_CALC_CLASS, NULL, 36 Efl_Ui_Focus_Manager *m = efl_add_ref(EFL_UI_FOCUS_MANAGER_CALC_CLASS, NULL,
37 efl_ui_focus_manager_root_set(efl_added, r1) 37 efl_ui_focus_manager_root_set(efl_added, r1)
38 ); 38 );
39 39
40 fail_if(!efl_ui_focus_manager_calc_register(m, r2, r1, NULL)); 40 fail_if(!efl_ui_focus_manager_calc_register(m, r2, r1, NULL));
41 fail_if(efl_ui_focus_manager_calc_register(m, r2, r1, NULL)); 41 fail_if(efl_ui_focus_manager_calc_register(m, r2, r1, NULL));
42 42
43 efl_del(r1); 43 efl_unref(r1);
44 efl_del(m); 44 efl_unref(m);
45 45
46 elm_shutdown(); 46 elm_shutdown();
47} 47}
@@ -81,11 +81,11 @@ START_TEST(pos_check)
81 CHECK(north, east, west, NULL, middle) 81 CHECK(north, east, west, NULL, middle)
82 CHECK(south, east, west, middle, NULL) 82 CHECK(south, east, west, middle, NULL)
83 83
84 efl_del(middle); 84 efl_unref(middle);
85 efl_del(south); 85 efl_unref(south);
86 efl_del(north); 86 efl_unref(north);
87 efl_del(east); 87 efl_unref(east);
88 efl_del(west); 88 efl_unref(west);
89 89
90 elm_shutdown(); 90 elm_shutdown();
91} 91}
@@ -155,11 +155,11 @@ START_TEST(pos_check2)
155 155
156#undef ck_assert_set_eq 156#undef ck_assert_set_eq
157 157
158 efl_del(middle); 158 efl_unref(middle);
159 efl_del(north_east); 159 efl_unref(north_east);
160 efl_del(north_west); 160 efl_unref(north_west);
161 efl_del(south_east); 161 efl_unref(south_east);
162 efl_del(south_west); 162 efl_unref(south_west);
163 163
164 elm_shutdown(); 164 elm_shutdown();
165} 165}
@@ -174,11 +174,11 @@ START_TEST(redirect)
174 TEST_OBJ_NEW(one, 0, 0, 20, 20); 174 TEST_OBJ_NEW(one, 0, 0, 20, 20);
175 TEST_OBJ_NEW(two, 20, 0, 20, 20); 175 TEST_OBJ_NEW(two, 20, 0, 20, 20);
176 176
177 Efl_Ui_Focus_Manager *m = efl_add(EFL_UI_FOCUS_MANAGER_CALC_CLASS, NULL, 177 Efl_Ui_Focus_Manager *m = efl_add_ref(EFL_UI_FOCUS_MANAGER_CALC_CLASS, NULL,
178 efl_ui_focus_manager_root_set(efl_added, root) 178 efl_ui_focus_manager_root_set(efl_added, root)
179 ); 179 );
180 180
181 Efl_Ui_Focus_Manager *m2 = efl_add(EFL_UI_FOCUS_MANAGER_CALC_CLASS, NULL, 181 Efl_Ui_Focus_Manager *m2 = efl_add_ref(EFL_UI_FOCUS_MANAGER_CALC_CLASS, NULL,
182 efl_ui_focus_manager_root_set(efl_added, root2) 182 efl_ui_focus_manager_root_set(efl_added, root2)
183 ); 183 );
184 184
@@ -308,7 +308,7 @@ START_TEST(finalize_check)
308 char *args[] = { "exe" }; 308 char *args[] = { "exe" };
309 elm_init(1, args); 309 elm_init(1, args);
310 310
311 m = efl_add(EFL_UI_FOCUS_MANAGER_CALC_CLASS, NULL); 311 m = efl_add_ref(EFL_UI_FOCUS_MANAGER_CALC_CLASS, NULL);
312 fail_if(m); 312 fail_if(m);
313 313
314 elm_shutdown(); 314 elm_shutdown();
@@ -326,11 +326,11 @@ START_TEST(redirect_param)
326 TEST_OBJ_NEW(root2, 0, 20, 20, 20); 326 TEST_OBJ_NEW(root2, 0, 20, 20, 20);
327 TEST_OBJ_NEW(child, 0, 20, 20, 20); 327 TEST_OBJ_NEW(child, 0, 20, 20, 20);
328 328
329 m = efl_add(EFL_UI_FOCUS_MANAGER_CALC_CLASS, NULL, 329 m = efl_add_ref(EFL_UI_FOCUS_MANAGER_CALC_CLASS, NULL,
330 efl_ui_focus_manager_root_set(efl_added, root) 330 efl_ui_focus_manager_root_set(efl_added, root)
331 ); 331 );
332 332
333 m2 = efl_add(EFL_UI_FOCUS_MANAGER_CALC_CLASS, NULL, 333 m2 = efl_add_ref(EFL_UI_FOCUS_MANAGER_CALC_CLASS, NULL,
334 efl_ui_focus_manager_root_set(efl_added, root2) 334 efl_ui_focus_manager_root_set(efl_added, root2)
335 ); 335 );
336 336
@@ -354,7 +354,7 @@ START_TEST(invalid_args_check)
354 TEST_OBJ_NEW(child, 0, 20, 20, 20); 354 TEST_OBJ_NEW(child, 0, 20, 20, 20);
355 TEST_OBJ_NEW(child2, 0, 20, 20, 20); 355 TEST_OBJ_NEW(child2, 0, 20, 20, 20);
356 356
357 m = efl_add(EFL_UI_FOCUS_MANAGER_CALC_CLASS, NULL, 357 m = efl_add_ref(EFL_UI_FOCUS_MANAGER_CALC_CLASS, NULL,
358 efl_ui_focus_manager_root_set(efl_added, root) 358 efl_ui_focus_manager_root_set(efl_added, root)
359 ); 359 );
360 360
@@ -389,7 +389,7 @@ START_TEST(order_check)
389 TEST_OBJ_NEW(child2, 0, 20, 20, 20); 389 TEST_OBJ_NEW(child2, 0, 20, 20, 20);
390 TEST_OBJ_NEW(child3, 0, 20, 20, 20); 390 TEST_OBJ_NEW(child3, 0, 20, 20, 20);
391 391
392 m = efl_add(EFL_UI_FOCUS_MANAGER_CALC_CLASS, NULL, 392 m = efl_add_ref(EFL_UI_FOCUS_MANAGER_CALC_CLASS, NULL,
393 efl_ui_focus_manager_root_set(efl_added, root) 393 efl_ui_focus_manager_root_set(efl_added, root)
394 ); 394 );
395 395
@@ -428,7 +428,7 @@ START_TEST(logical_shift)
428 TEST_OBJ_NEW(sub_sub, 0, 0, 10, 10); 428 TEST_OBJ_NEW(sub_sub, 0, 0, 10, 10);
429 TEST_OBJ_NEW(sub_child, 0, 0, 10, 10); 429 TEST_OBJ_NEW(sub_child, 0, 0, 10, 10);
430 430
431 m = efl_add(EFL_UI_FOCUS_MANAGER_CALC_CLASS, NULL, 431 m = efl_add_ref(EFL_UI_FOCUS_MANAGER_CALC_CLASS, NULL,
432 efl_ui_focus_manager_root_set(efl_added, root) 432 efl_ui_focus_manager_root_set(efl_added, root)
433 ); 433 );
434 434
@@ -461,13 +461,13 @@ START_TEST(root_redirect_chain)
461 TEST_OBJ_NEW(root2, 0, 20, 20, 20); 461 TEST_OBJ_NEW(root2, 0, 20, 20, 20);
462 TEST_OBJ_NEW(child, 0, 20, 20, 20); 462 TEST_OBJ_NEW(child, 0, 20, 20, 20);
463 463
464 m = efl_add(EFL_UI_FOCUS_MANAGER_CALC_CLASS, NULL, 464 m = efl_add_ref(EFL_UI_FOCUS_MANAGER_CALC_CLASS, NULL,
465 efl_ui_focus_manager_root_set(efl_added, root) 465 efl_ui_focus_manager_root_set(efl_added, root)
466 ); 466 );
467 467
468 focus_test_manager_set(root2, m); 468 focus_test_manager_set(root2, m);
469 469
470 m2 = efl_add(EFL_UI_FOCUS_MANAGER_CALC_CLASS, NULL, 470 m2 = efl_add_ref(EFL_UI_FOCUS_MANAGER_CALC_CLASS, NULL,