6 Sep
2009
6 Sep
'09
2 p.m.
struct object { void init() { selfAncor_ = some_intrusive_ptr<object>(this); connection1_ = signal1_.connect(&handle, ref(selfAncor_)); connection2_ = signal2_.connect(&handle, ref(selfAncor_));
No, you want to bind a copy of the smart pointer to the slot by value. Making the slot accept it by reference just avoids creating another temporary copy during invocation
Excuse my ignorance, how can I make "the slot accept it by reference" if I bind "a copy of the smart pointer to the slot by value"?