GNOME Bugzilla – Bug 740942
core: Fix excessive ref'ing when registering new keys
Last modified: 2014-12-02 10:22:29 UTC
.
Created attachment 291851 [details] [review] core: Fix excessive ref'ing when registering new keys When registering new metadata keys, there's no need to take a new reference to the GParamSpec passed, as the usual construct is to call g_param_spec_new_... in the call to grl_registry_register_metadata_key(), leaking the original reference to the GParamSpec when grilo it de-inited.
Half the plugins do it that way, half the plugins do it the other way. So either we choose to take ownership, or not. Either way, plugins will need to be fixed, just let me know which way it should go (I prefer this way...).
Created attachment 291916 [details] [review] core: Fix excessive ref'ing when registering new keys When registering new metadata keys, there's no need to take a new reference to the GParamSpec passed, as the usual construct is to call g_param_spec_new_... in the call to grl_registry_register_metadata_key(), leaking the original reference to the GParamSpec when grilo it de-inited.
(In reply to comment #2) > Half the plugins do it that way, half the plugins do it the other way. > > So either we choose to take ownership, or not. Either way, plugins will need to > be fixed, just let me know which way it should go (I prefer this way...). Yeah, I prefer this way too. Let's transfer the full key to core.
Review of attachment 291916 [details] [review]: LGTM
Comment on attachment 291916 [details] [review] core: Fix excessive ref'ing when registering new keys Attachment 291916 [details] pushed as d3a2c27 - core: Fix excessive ref'ing when registering new keys
The plugins have been fixed now.