Page MenuHomePhabricator

ecore: enforce proper lifecycle for all Efl.Composite_Model children.
ClosedPublic

Authored by cedric on Feb 1 2019, 4:00 AM.

Details

Summary

This make sure that the object returned by children_slice_get are properly
destroyed when the refcount drop to only the parent holding a reference on
it. This make it clear that the user of the api can rely on efl_ref/efl_unref
to actually manage its use of the returned object.

Diff Detail

Repository
rEFL core/efl
Branch
T7528-devs/cedric/child_noref
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 9434
cedric created this revision.Feb 1 2019, 4:00 AM
cedric updated this revision to Diff 19237.Feb 7 2019, 1:57 AM

Rebase and rename.

cedric updated this revision to Diff 19290.Feb 11 2019, 10:04 AM

Rebase and rename.

segfaultxavi requested changes to this revision.Feb 21 2019, 12:30 PM

Can you please check all this alleged leaks and tell me if they are right or wrong?

Also, is this patch trying to fix an actual problem? Is there some crash that this fixes? It should be explained in the commit message.

src/lib/ecore/efl_select_model.c
164

Shouldn't this path unref obj too?

183

Shouldn't this path unref obj too?

345

Shouldn't this also add a .free function to unref the parent?

356

Shouldn't this also add a .free function to unref obj?

This revision now requires changes to proceed.Feb 21 2019, 12:30 PM
cedric updated this revision to Diff 19562.Feb 21 2019, 2:05 PM
cedric edited the summary of this revision. (Show Details)

Rebase and fix lifecycle problem spotted by Xavi.

cedric updated this revision to Diff 19565.Feb 21 2019, 2:41 PM
cedric edited the summary of this revision. (Show Details)

Reword.

zmike accepted this revision.Feb 21 2019, 3:04 PM
cedric updated this revision to Diff 19569.Feb 21 2019, 6:01 PM

Rebase.

segfaultxavi accepted this revision.Feb 21 2019, 11:40 PM
This revision is now accepted and ready to land.Feb 21 2019, 11:40 PM
This revision was automatically updated to reflect the committed changes.