Go to file
Tom Hacohen 250be1e27a Revert "Eo: Remove eo_del() and make eo_unref() the replacement."
This reverts commit 546ff7bbba788ec834c5608361c0834853f2d5d7.

It seems that eo_del() is useful and removing it was creating bugs.
The issue is that the way we defined parents in eo, both the parent and
the programmer share a reference to the object. When we eo_unref() that
reference as the programmer, eo has no way to know it's this specific
reference we are freeing, and not a general one, so in some
circumstances, for example:
eo_ref(child);
eo_unref(child); // trying to delete here
eo_unref(container); // container is deleted here
eo_unref(child); // child already has 0 refs before this point.

We would have an issue with references and objects being freed too soon
and in general, issue with the references.

Having eo_del() solves that, because this one explicitly unparents if
there is a parent, meaning the reference ownership is explicitly taken
by the programmer.

eo_del() is essentially a convenience function around "check if has
parent, and if so unparent, otherwise, unref". Which should be used when
you want to delete an object although it has a parent, and is equivalent
to eo_unref() when it doesn't have one.
2016-06-01 13:33:21 +01:00
ecore examples: ecore: add all needed files to SOURCES to make sure they are distributed 2016-05-18 12:17:16 +02:00
ecore_avahi Examples: Fix compilation (disable CXX examples!) 2016-04-21 17:16:53 +09:00
edje examples: add DESTDIR support for install. 2016-04-14 17:00:08 -07:00
eet examples: add DESTDIR support for install. 2016-04-14 17:00:08 -07:00
eina examples: add DESTDIR support for install. 2016-04-14 17:00:08 -07:00
eina_cxx examples: add DESTDIR support for install. 2016-04-14 17:00:08 -07:00
eio eio: Adds Eo-based Eio API 2016-05-25 21:32:03 -03:00
eldbus examples: add DESTDIR support for install. 2016-04-14 17:00:08 -07:00
elementary Revert "autotools: fix lots of warning." 2016-05-16 09:29:29 -07:00
elocation examples: add DESTDIR support for install. 2016-04-14 17:00:08 -07:00
elua elua: unbreak make install-examples 2016-04-08 16:01:07 -07:00
emile examples: add DESTDIR support for install. 2016-04-14 17:00:08 -07:00
emotion examples: add DESTDIR support for install. 2016-04-14 17:00:08 -07:00
eolian_cxx Revert "autotools: fix lots of warning." 2016-05-16 09:29:29 -07:00
ephysics examples: add DESTDIR support for install. 2016-04-14 17:00:08 -07:00
ethumb_client examples: add DESTDIR support for install. 2016-04-14 17:00:08 -07:00
evas examples: evas: build evas-3d-fog example 2016-05-18 12:17:16 +02:00
unsorted Revert "Eo: Remove eo_del() and make eo_unref() the replacement." 2016-06-01 13:33:21 +01:00