eldbus: object created with efl_add should be destroyed with efl_del.

Differential Revision: https://phab.enlightenment.org/D6090
This commit is contained in:
Cedric Bail 2018-05-02 13:42:52 -07:00 committed by Cedric BAIL
parent 6bb450d7ee
commit 71cd44c176
4 changed files with 7 additions and 7 deletions

View File

@ -170,7 +170,7 @@ check_property(Eo *object, const char *property_name, const char *expected_value
Eo * Eo *
create_connection(void) create_connection(void)
{ {
Eo *connection = efl_add_ref(ELDBUS_MODEL_CONNECTION_CLASS, efl_main_loop_get(), Eo *connection = efl_add(ELDBUS_MODEL_CONNECTION_CLASS, efl_main_loop_get(),
eldbus_model_connect(efl_added, ELDBUS_CONNECTION_TYPE_SESSION, NULL, EINA_FALSE)); eldbus_model_connect(efl_added, ELDBUS_CONNECTION_TYPE_SESSION, NULL, EINA_FALSE));
ck_assert_ptr_ne(NULL, connection); ck_assert_ptr_ne(NULL, connection);
return connection; return connection;
@ -268,7 +268,7 @@ check_efl_model_children_slice_get(Efl_Model *efl_model)
EFL_START_TEST(smoke) EFL_START_TEST(smoke)
{ {
Eo *connection = create_connection(); Eo *connection = create_connection();
efl_unref(connection); efl_del(connection);
} }
EFL_END_TEST EFL_END_TEST
@ -276,7 +276,7 @@ EFL_START_TEST(object)
{ {
Eo *root = create_object(); Eo *root = create_object();
efl_unref(root); efl_del(root);
} }
EFL_END_TEST EFL_END_TEST

View File

@ -24,7 +24,7 @@ _setup(void)
static void static void
_teardown(void) _teardown(void)
{ {
efl_unref(connection); efl_del(connection);
} }
EFL_START_TEST(properties_get) EFL_START_TEST(properties_get)

View File

@ -24,7 +24,7 @@ _setup(void)
static void static void
_teardown(void) _teardown(void)
{ {
efl_unref(object); efl_del(object);
} }
EFL_START_TEST(properties_get) EFL_START_TEST(properties_get)

View File

@ -49,7 +49,7 @@ _setup(void)
static void static void
_teardown(void) _teardown(void)
{ {
efl_unref(dbus_object1); efl_del(dbus_object1);
} }
EFL_START_TEST(properties_get) EFL_START_TEST(properties_get)