Disconnecting signal handlers

Let's take another look at a Signal's connect method:

sigc::connection signal<void(int)>::connect(const sigc::slot<void(int)>&);

The returned sigc::connection can be used to control the connection. By keeping a connection object you can disconnect its associated signal handler using the sigc::connection::disconnect() method.