
22 Jul
2008
22 Jul
'08
2:37 p.m.
Oh, I see that thread_safe_signals already does what I need - one can safely bind a regular pointer instead of shared_ptr (by the way, is it safe to do this if the object already inherits from enable_shared_from_this?). Is it planned to be released as a part of 1.36?
o1->someSignal_->connect(bind(&Class2::responder, o2)); // besides, o2 has a shared_ptr to o1
I'd like this signal-slot to be "weak", i.e. instead of "bind(&Class2::responder, o2)" I wish it could be "bind(&Class2::responder, weak_ptr(o2))" - which is illegal.