GNOME Bugzilla – Bug 789245
g_settings_bind() not conforming to lifecycle specification
Last modified: 2017-10-23 11:20:36 UTC
Hi, The reference says "note that the lifecycle of the binding is tied to the object" for g_settings_bind(), but in the code the binding seems to have a reference to settings, preventing it from being destroyed: https://git.gnome.org/browse/glib/tree/gio/gsettings.c?id=9814898df6a2ea3006d5cbb457bd8419d8e815d4#n2853 https://git.gnome.org/browse/glib/tree/gio/gsettings.c?id=9814898df6a2ea3006d5cbb457bd8419d8e815d4#n3072 Thanks.
The "object" to which it's referring to is the object you pass to g_settings_bind(), not the GSettings instance. Once the object goes away, the reference acquired on the GSettings instance is also released. We could modify the documentation to use `@object`; this way it would be a bit clearer to which object instance we're referring to.
Created attachment 361944 [details] [review] 0001-gsettings-make-g_settings_bind-documentation-clearer.patch
Review of attachment 361944 [details] [review]: Looks good, thanks!
(In reply to Emmanuele Bassi (:ebassi) from comment #3) > Review of attachment 361944 [details] [review] [review]: > > Looks good, thanks! Can you please push it as I don't have the commit rights?
Pushed, thanks for the patch.