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 695119 - text: Fix PangoFontDescription leak
text: Fix PangoFontDescription leak
Status: RESOLVED FIXED
Product: clutter
Classification: Platform
Component: ClutterText
git master
Other Linux
: Normal normal
: ---
Assigned To: clutter-maint
clutter-maint
Depends on:
Blocks:
 
 
Reported: 2013-03-04 12:38 UTC by Pavel Vasin
Modified: 2013-03-04 23:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
text: Fix PangoFontDescription leak (1.00 KB, patch)
2013-03-04 12:38 UTC, Pavel Vasin
none Details | Review
thanks for the patch! it's much appreciated. (2.66 KB, patch)
2013-03-04 13:09 UTC, Emmanuele Bassi (:ebassi)
committed Details | Review

Description Pavel Vasin 2013-03-04 12:38:22 UTC
Created attachment 237970 [details] [review]
text: Fix PangoFontDescription leak

patch attached
Comment 1 Emmanuele Bassi (:ebassi) 2013-03-04 13:09:11 UTC
Created attachment 237976 [details] [review]
thanks for the patch! it's much appreciated.

I do think that the current semantics of set_font_description_internal() are actually bonghits; setters (event internal ones) should just copy the objects they are passed, and not play games with ownership transfer, lest we find ourselves into situations like these.

the following patch makes set_font_description_internal() work like the rest of the Clutter setters, and leaves the ownership of the passed PangoFontDescription to the callers.

it would be great if you could test it.

thanks again!
Comment 2 Pavel Vasin 2013-03-04 15:44:34 UTC
Review of attachment 237976 [details] [review]:

Looks right and works.
Comment 3 Emmanuele Bassi (:ebassi) 2013-03-04 23:10:31 UTC
thanks for the review!