GNOME Bugzilla – Bug 787600
PlacesSidebar/SidebarRow: CloudProvider singleton/accounts are never unrefd
Last modified: 2017-09-18 23:28:05 UTC
↓
Created attachment 359666 [details] [review] SidebarRow: Unref CloudProvider on change/finalize It was never unref()d, either when replacing the existing GObject in set_property(), cleaning up in finalize(), or becoming a placeholder. Fix by using g_set_object() and g_clear_object() to unref as needed. This also drops the check that the newly set object is a valid cloud provider account, as we don’t do the equivalent for any of the other object-typed properties, and Carlos didn’t think this was important.
Created attachment 359667 [details] [review] SidebarRow: Unref CloudProvider on change/finalize It was never unref()d, either when replacing the existing GObject in set_property(), cleaning up in finalize(), or becoming a placeholder. Fix by using g_set_object() and g_clear_object() to unref as needed. This also drops the check that the newly set object is a valid cloud provider account, as we don’t do the equivalent for any of the other object-typed properties, and Carlos didn’t think this was important.
Created attachment 359668 [details] [review] PlacesSidebar: Unref cloud_manager in finalize() We create or ref the CloudProviders singleton in init() but did not unref it in finalize(). Do so, using g_clear_object().
Created attachment 359669 [details] [review] PlacesSidebar: Unref cloud_manager in dispose() We create or ref the CloudProviders singleton in init() but did not unref it in dispose(). Do so, using g_clear_object().
Attachment 359667 [details] pushed as bfe54d1 - SidebarRow: Unref CloudProvider on change/finalize Attachment 359669 [details] pushed as c18ac0c - PlacesSidebar: Unref cloud_manager in dispose()