aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/edje
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2018-06-10 16:30:07 +0200
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2018-06-10 17:01:33 +0200
commitd1e1adf0bc4fadb401c778f98110c9ee49540a2c (patch)
treee32888121f62eea63effe8eb071f7fdcc4219e07 /src/lib/edje
parentexamples: fix efl_model parent loop add (diff)
downloadefl-d1e1adf0bc4fadb401c778f98110c9ee49540a2c.tar.gz
edje: fix edje_part_helpers refcounting
Summary: the reference from efl_reuse was forgotten & the parent relation was not correctlty setted, which led to the fact that NOREF was never emitted. This caused that thte object never really was destructed probebly, and thus the del_interceptor_cb was not executed, and the object simply leaked. The test checks that those properties are correctly set, additionally a error is printed in the efl code when a part has not the expected reference properties. This also enforces errors when users are doing wrong things with objects returned by efl_part. Reviewers: ManMower, zmike Reviewed By: zmike Subscribers: cedric, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D6254
Diffstat (limited to 'src/lib/edje')
-rw-r--r--src/lib/edje/edje_part_helper.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/edje/edje_part_helper.h b/src/lib/edje/edje_part_helper.h
index dbed9b1772..a1c5596c6f 100644
--- a/src/lib/edje/edje_part_helper.h
+++ b/src/lib/edje/edje_part_helper.h
@@ -91,6 +91,8 @@ _edje_ ## type ## _internal_proxy_get(Edje_Object *obj EINA_UNUSED, Edje *ed, Ed
else \
{ \
PROXY_STATIC_VAR(type) = NULL; \
+ efl_parent_set(proxy, ed->obj); \
+ efl_unref(proxy); /* efl_reuse gives us one additional reference, give this one up as we gave ownerwhip back to ed->obj */\
_edje_real_part_set(proxy, ed, rp, part); \
} \
__VA_ARGS__; \