GNOME Bugzilla – Bug 668269
gsignal: add g_signal_handlers_disconnect_by_data
Last modified: 2012-01-20 18:25:55 UTC
This is obviously useful, but potentially dangerous because you could inadvertently remove other people's connections. Its use is safe in at least these two cases: 1) When either the source or target is a private pointer and you are therefore sure that nobody else has hooked up anything between them. 2) When finalizing the target, because if any signal handlers are left past this point then you're already in undefined behaviour territory.
Created attachment 205625 [details] [review] gsignal: add g_signal_handlers_disconnect_by_data Similar to g_signal_handlers_disconnect_by_func() but disconnects all functions that use the given user_data.