Wiki page eo-refcount.md changed with summary [] by Dmitri Chudinov
This commit is contained in:
parent
186a41e603
commit
936f9cd3e3
|
@ -35,15 +35,15 @@ static void
|
|||
_obj_create()
|
||||
{
|
||||
// First create a root element
|
||||
_root = efl_new(EFL_MODEL_ITEM_CLASS,
|
||||
_root = efl_new(EFL_MODEL_PROVIDER_CLASS,
|
||||
efl_name_set(efl_added, "Root"));
|
||||
|
||||
// Create the first child element
|
||||
_child1 = efl_add(EFL_MODEL_ITEM_CLASS, _root,
|
||||
_child1 = efl_add(EFL_MODEL_PROVIDER_CLASS, _root,
|
||||
efl_name_set(efl_added, "Child1"));
|
||||
|
||||
// Create the second child element, this time, with an extra reference
|
||||
_child2 = efl_add_ref(EFL_MODEL_ITEM_CLASS, _root,
|
||||
_child2 = efl_add_ref(EFL_MODEL_PROVIDER_CLASS, _root,
|
||||
efl_name_set(efl_added, "Child2"));
|
||||
}
|
||||
|
||||
|
@ -162,19 +162,19 @@ static void
|
|||
_obj_create()
|
||||
{
|
||||
// First create a root element
|
||||
_root = efl_new(EFL_MODEL_ITEM_CLASS,
|
||||
_root = efl_new(EFL_MODEL_PROVIDER_CLASS,
|
||||
efl_name_set(efl_added, "Root"));
|
||||
// Add a weak reference so we can keep track of its state
|
||||
efl_wref_add(_root, &_root_ref);
|
||||
|
||||
// Create the first child element
|
||||
_child1 = efl_add(EFL_MODEL_ITEM_CLASS, _root,
|
||||
_child1 = efl_add(EFL_MODEL_PROVIDER_CLASS, _root,
|
||||
efl_name_set(efl_added, "Child1"));
|
||||
// Add a weak reference so we can keep track of its state
|
||||
efl_wref_add(_child1, &_child1_ref);
|
||||
|
||||
// Create the second child element, this time, with an extra reference
|
||||
_child2 = efl_add_ref(EFL_MODEL_ITEM_CLASS, _root,
|
||||
_child2 = efl_add_ref(EFL_MODEL_PROVIDER_CLASS, _root,
|
||||
efl_name_set(efl_added, "Child2"));
|
||||
// Add a weak reference so we can keep track of its state
|
||||
efl_wref_add(_child2, &_child2_ref);
|
||||
|
@ -305,19 +305,19 @@ static void
|
|||
_obj_create()
|
||||
{
|
||||
// First create a root element
|
||||
_root = efl_new(EFL_MODEL_ITEM_CLASS,
|
||||
_root = efl_new(EFL_MODEL_PROVIDER_CLASS,
|
||||
efl_name_set(efl_added, "Root"));
|
||||
// Add a weak reference so we can keep track of its state
|
||||
efl_wref_add(_root, &_root_ref);
|
||||
|
||||
// Create the first child element
|
||||
_child1 = efl_add(EFL_MODEL_ITEM_CLASS, _root,
|
||||
_child1 = efl_add(EFL_MODEL_PROVIDER_CLASS, _root,
|
||||
efl_name_set(efl_added, "Child1"));
|
||||
// Add a weak reference so we can keep track of its state
|
||||
efl_wref_add(_child1, &_child1_ref);
|
||||
|
||||
// Create the second child element, this time, with an extra reference
|
||||
_child2 = efl_add_ref(EFL_MODEL_ITEM_CLASS, _root,
|
||||
_child2 = efl_add_ref(EFL_MODEL_PROVIDER_CLASS, _root,
|
||||
efl_name_set(efl_added, "Child2"));
|
||||
// Add a weak reference so we can keep track of its state
|
||||
efl_wref_add(_child2, &_child2_ref);
|
||||
|
@ -399,7 +399,7 @@ Use it to be notified of the destruction of each object. ``_obj_create()`` shoul
|
|||
```c
|
||||
[...]
|
||||
// First create a root element
|
||||
_root = efl_new(EFL_MODEL_ITEM_CLASS,
|
||||
_root = efl_new(EFL_MODEL_PROVIDER_CLASS,
|
||||
efl_name_set(efl_added, "Root"));
|
||||
// Add a weak reference so we can keep track of its state
|
||||
efl_wref_add(_root, &_root_ref);
|
||||
|
@ -407,7 +407,7 @@ Use it to be notified of the destruction of each object. ``_obj_create()`` shoul
|
|||
efl_event_callback_add(_root, EFL_EVENT_DEL, _obj_destroy_cb, NULL);
|
||||
|
||||
// Create the first child element
|
||||
_child1 = efl_add(EFL_MODEL_ITEM_CLASS, _root,
|
||||
_child1 = efl_add(EFL_MODEL_PROVIDER_CLASS, _root,
|
||||
efl_name_set(efl_added, "Child1"));
|
||||
// Add a weak reference so we can keep track of its state
|
||||
efl_wref_add(_child1, &_child1_ref);
|
||||
|
@ -415,7 +415,7 @@ Use it to be notified of the destruction of each object. ``_obj_create()`` shoul
|
|||
efl_event_callback_add(_child1, EFL_EVENT_DEL, _obj_destroy_cb, NULL);
|
||||
|
||||
// Create the second child element, this time, with an extra reference
|
||||
_child2 = efl_add_ref(EFL_MODEL_ITEM_CLASS, _root,
|
||||
_child2 = efl_add_ref(EFL_MODEL_PROVIDER_CLASS, _root,
|
||||
efl_name_set(efl_added, "Child2"));
|
||||
// Add a weak reference so we can keep track of its state
|
||||
efl_wref_add(_child2, &_child2_ref);
|
||||
|
@ -502,7 +502,7 @@ static void
|
|||
_obj_create()
|
||||
{
|
||||
// First create a root element
|
||||
_root = efl_new(EFL_MODEL_ITEM_CLASS,
|
||||
_root = efl_new(EFL_MODEL_PROVIDER_CLASS,
|
||||
efl_name_set(efl_added, "Root"));
|
||||
// Add a weak reference so we can keep track of its state
|
||||
efl_wref_add(_root, &_root_ref);
|
||||
|
@ -510,7 +510,7 @@ _obj_create()
|
|||
efl_event_callback_add(_root, EFL_EVENT_DEL, _obj_destroy_cb, NULL);
|
||||
|
||||
// Create the first child element
|
||||
_child1 = efl_add(EFL_MODEL_ITEM_CLASS, _root,
|
||||
_child1 = efl_add(EFL_MODEL_PROVIDER_CLASS, _root,
|
||||
efl_name_set(efl_added, "Child1"));
|
||||
// Add a weak reference so we can keep track of its state
|
||||
efl_wref_add(_child1, &_child1_ref);
|
||||
|
@ -518,7 +518,7 @@ _obj_create()
|
|||
efl_event_callback_add(_child1, EFL_EVENT_DEL, _obj_destroy_cb, NULL);
|
||||
|
||||
// Create the second child element, this time, with an extra reference
|
||||
_child2 = efl_add_ref(EFL_MODEL_ITEM_CLASS, _root,
|
||||
_child2 = efl_add_ref(EFL_MODEL_PROVIDER_CLASS, _root,
|
||||
efl_name_set(efl_added, "Child2"));
|
||||
// Add a weak reference so we can keep track of its state
|
||||
efl_wref_add(_child2, &_child2_ref);
|
||||
|
|
Loading…
Reference in New Issue