Depends on D7861
At some point you'll need to sit with me and write a tutorial about Models...
So, how is this new method supposed to be used? Every time I call children_slice_get I need to call child_slice_define? That sounds like it could be done automatically.
It is a decision that the Model has to made depending on the lifecycle it expect for its children. Basically if the Model has a lot of potential children, it is better for them to only be alive when a client need them instead of being alive for as long as the parent Model is. For example, Efl.Io.Model child should really only live for when they are actually used by the View, but for Eldbus.Model, the children object can stay alive for as long as the parent as they are very small number actually. So it depends on what the internal of the parent Model (the one that implement children_slice_get) needs.
When that function is called it will automatically destroy the children Model when the only reference left is the parent reference. Enforcing that the Model is alive for as long as the View use them.
OK, I understand the use case. This will need example code at some point.
What this method does is installing a handler so the child models are destroyed when they have no refs besides their parent's, correct?
Then I do not think child_slice_define is a clear enough name...