After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 696813 - clutter_actor_set_child_above/below_sibling leaking a reference on the actor
clutter_actor_set_child_above/below_sibling leaking a reference on the actor
Status: RESOLVED FIXED
Product: clutter
Classification: Platform
Component: ClutterActor
1.14.x
Other Mac OS
: Normal major
: ---
Assigned To: clutter-maint
clutter-maint
Depends on:
Blocks:
 
 
Reported: 2013-03-28 20:55 UTC by Craig Hughes
Modified: 2013-06-12 09:31 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Unref the extra ref we took (1.09 KB, patch)
2013-03-28 20:55 UTC, Craig Hughes
none Details | Review
Also fix clutter_actor_set_child_at_index (801 bytes, patch)
2013-03-28 21:02 UTC, Craig Hughes
none Details | Review

Description Craig Hughes 2013-03-28 20:55:09 UTC
Created attachment 240084 [details] [review]
Unref the extra ref we took

clutter_actor_set_child_above/below_sibling take an extra reference on the actor so it can be removed and re-added from the container without getting deleted.  But then the extra ref is never released, which means that actors end up getting leaked.

Patch unrefs after adding the actor back into the container
Comment 1 Craig Hughes 2013-03-28 21:02:54 UTC
Created attachment 240085 [details] [review]
Also fix clutter_actor_set_child_at_index

I did more checking and the same bug is in clutter_actor_set_child_at_index too
Comment 2 Craig Hughes 2013-04-24 16:22:01 UTC
bump
Comment 3 Emmanuele Bassi (:ebassi) 2013-06-12 09:31:04 UTC
ouch, thanks for you patches, and sorry for taking this long.

I've pushed your patches to clutter-1.16 and clutter-1.14, alongside with a bunch of checks in the conformance test suite to ensure we catch reference leaks like these in the future.

again, thanks!