GNOME Bugzilla – Bug 675481
xsettings plugin makes unsafe use of GSettings
Last modified: 2012-05-30 10:13:31 UTC
the xsettings plugin connects signals to GSettings but never disconnects them simply unreffing the GSettings object is not enough to ensure that signals will never be delivered again. a signal delivery could already be waiting to be dispatched from the mainloop (holding its own ref).
Created attachment 213476 [details] [review] xsettings: use g_signal_connect_object with GSettings This way we automatically disconnect the signal handler when our objects die (during shutdown).
Review of attachment 213476 [details] [review]: Given the warnings in the docs for g_signal_connect_object(), I'd rather we stored the id's for those signal connect and unhooked them ourselves.
There's no leak in this case because the GSettings object will be destroyed quite soon anyway...
Attachment 213476 [details] pushed as 7e87d46 - xsettings: use g_signal_connect_object with GSettings