summaryrefslogtreecommitdiff
path: root/src/examples
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 /src/examples
parenta1bf513920e813037756e01cc2e01770befea77c (diff)
efl: use efl_add_ref to create objects which have no parent
Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com>
Diffstat (limited to 'src/examples')
-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
19 files changed, 53 insertions, 53 deletions
diff --git a/src/examples/ecore/ecore_audio_custom.c b/src/examples/ecore/ecore_audio_custom.c
index 8089918089..b0d26a1e75 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 31713031b4..c659f09d55 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 194e31e648..756e69a209 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 53e7d6fed4..2185210763 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 6c55dbc285..3cbbcc5f2e 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 016b4486f5..b7e526bd3c 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 9a9738859b..9367716729 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 df6e210add..6d5aa30e80 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 93ad6ba926..2d21352d03 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 fd228458e0..75acb0b42d 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 f8503c0d38..1010ca7fda 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 342df05ad9..e604e8900d 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 145861e286..eeb2f2329e 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 187cee0d54..9826487c78 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 32d5b1951d..0e211e03fe 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 b09756c272..64886337b2 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 f09657bafc..657148c0e0 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 af14785118..39df4f87c0 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 5c6660eb1d..e93b34437d 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);