This is similar to connect_data, but uses a closure which ensures that
the gobject stays alive during the call to c_handler by temporarily adding a reference count to gobject
.
When the gobject is destroyed the signal handler will be automatically disconnected. Note that this is not currently
threadsafe (ie: emitting a signal while gobject is being destroyed in another thread is not safe).
This function cannot fail. If the given signal name doesn’t exist, a critical warning is emitted. No validation is performed on the
"detail" string when specified in detailed_signal, other than a non-empty check.
Refer to the [signals documentation](signals.html) for more details.
| instance |
the instance to connect to. |
| detailed_signal |
a string of the form "signal-name: |
| gobject |
the object to pass as data to |
| c_handler |
the ObjectConstructorFunc to connect. |
| connect_flags |
a combination of ConnectFlags. |
|
the handler id. |