signal_impl::clear() in libsigc++ 3.0 contains // Don't let signal_impl::notify() erase the slots. It would invalidate the// iterator in the following loop. const bool saved_deferred = deferred_; signal_impl_exec_holder(this); The last line is obviously wrong. It just creates
a temporary signal_impl_exec_holder object which is immediately
destroyed. My question is: Shall it be changed to signal_impl_exec_holder exec(this); All occurences of signal_exec in libsigc++ 2.0 have been replaced in 3.0 by signal_impl_exec, except the one in clear(). Is it a mistake to use signal_impl_exec_holder in clear()? It's strange that signal_impl_holder, which increases both exec_count_ and shared_ptr's use_count, is not used in signal_impl::clear() when it's used in signal_impl::erase(). Kjell |