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 787600 - PlacesSidebar/SidebarRow: CloudProvider singleton/accounts are never unrefd
PlacesSidebar/SidebarRow: CloudProvider singleton/accounts are never unrefd
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
3.22.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2017-09-12 21:19 UTC by Daniel Boles
Modified: 2017-09-18 23:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
SidebarRow: Unref CloudProvider on change/finalize (2.14 KB, patch)
2017-09-12 21:19 UTC, Daniel Boles
none Details | Review
SidebarRow: Unref CloudProvider on change/finalize (2.14 KB, patch)
2017-09-12 21:20 UTC, Daniel Boles
committed Details | Review
PlacesSidebar: Unref cloud_manager in finalize() (946 bytes, patch)
2017-09-12 21:20 UTC, Daniel Boles
none Details | Review
PlacesSidebar: Unref cloud_manager in dispose() (944 bytes, patch)
2017-09-12 21:23 UTC, Daniel Boles
committed Details | Review

Description Daniel Boles 2017-09-12 21:19:13 UTC
Comment 1 Daniel Boles 2017-09-12 21:19:52 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.
Comment 2 Daniel Boles 2017-09-12 21:20:16 UTC
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.
Comment 3 Daniel Boles 2017-09-12 21:20:44 UTC
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().
Comment 4 Daniel Boles 2017-09-12 21:23:25 UTC
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().
Comment 5 Daniel Boles 2017-09-18 23:27:58 UTC
Attachment 359667 [details] pushed as bfe54d1 - SidebarRow: Unref CloudProvider on change/finalize
Attachment 359669 [details] pushed as c18ac0c - PlacesSidebar: Unref cloud_manager in dispose()