WWW-www.enlightenment.org pushed a commit to branch master.

http://git.enlightenment.org/website/www-content.git/commit/?id=0a8f5ad1274d6ccafba73630e02410c3827289c8

commit 0a8f5ad1274d6ccafba73630e02410c3827289c8
Author: Xavi Artigas <[email protected]>
Date:   Thu Nov 23 03:19:50 2017 -0800

    Wiki page eo-intro.md changed with summary [Added comment regarding 
efl_del() and efl_unparent()] by Xavi Artigas
---
 pages/develop/tutorial/c/eo-intro.md.txt | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/pages/develop/tutorial/c/eo-intro.md.txt 
b/pages/develop/tutorial/c/eo-intro.md.txt
index 6aa373d9b..c6d0705fe 100644
--- a/pages/develop/tutorial/c/eo-intro.md.txt
+++ b/pages/develop/tutorial/c/eo-intro.md.txt
@@ -111,6 +111,9 @@ Eo objects created through ``efl_add()`` have a starting 
reference count of 1, m
 * **If you assigned the object a parent** then said parent is the owner of the 
reference. There's nothing else that you need to do with the object. You cannot 
actually work with the object because you do not hold any reference to it (more 
about this later).
 * **If you gave no parent to the object**: If you passed ``NULL`` as the 
parent, then **you** are the owner of the reference and you are responsible for 
returning it with ``efl_unref()``. Forgetting to do so is the most common cause 
of memory leaks.
 
+> **NOTE:**
+> Parenthood does need to be permanent in EFL: you can always remove a child 
object from its parent using ``efl_unparent()``. Be careful, though, because 
this returns to you the reference the parent was holding. **You are now 
responsible for returning this reference**, and failing to do so will leak the 
object. If you want to remove the object from its parent **and** return the 
reference at the same time, you can use the convenience method ``efl_del()``.
+
 Back to the tutorial code, no parent was given to the object created in 
``_obj_create()``, therefore you need to return that reference at some point. 
It is time to fill-in the ``_obj_destroy()`` method:
 
 ```c

-- 


Reply via email to