[boost-users][signal] When can a connection become NULL ?
Hello, I have the problem of a connection becoming invalid (being set to NULL) even though none of the things mentioned in the signals documentation happens: Signal/slot disconnections occur when any of these conditions occur: - The connection is explicitly disconnected via the connection's disconnectmethod directly, or indirectly via the signal's disconnect method or scoped_connection's destructor. - A trackable object bound to the slot is destroyed. - The signal is destroyed. Is anyone aware of other conditions under which a connection could become NULL ? Here is a code snippet: ----------------------------------------------------------------- boost::signal<int(vtkLookupTable*)> m_signal; boost::signals::connection m_connection; .... CScalarBarLayerGeometry* l_receive = cast_poly<CScalarBarLayerGeometry*>(p_layer->GetGeometry()) m_connection = m_signal.connect(boost::bind(&CScalarBarLayerGeometry::SetLookupTable,l_receive, _1)); ------------------------------------------------------------------- The first time I invoke m_connection.connected() it returns true. The second time it returns false and the connection is NULL. Any help would be appreciated. Best regards, Oliver
participants (1)
-
Oliver Kania