On 2/21/07, Frank Mori Hess
I'd like to propose we add an add_tracked() function to the connection object. This would allow an arbitrary shared_ptr/weak_ptr to be added to the list of objects tracked for the slot. The justification is to allow for situations where an object needed by the slot is not directly owned by a shared_ptr, or doesn't directly correspond to an argument of the bound function. For example, the bound argument might be contained inside another object which is in turn managed by a shared_ptr. We could actually dump boost::track() entirely if we wanted, if we have add_tracked().
- -- Frank
So, for example, foo is what we want to track, but bar (somehow inside of foo) is what we want to bind/call? Shouldn't that all happen on the same function call: signal.connect(bind(bar, func), foo) // pass foo in as the object that guarantees bar's lifetime. So a 'guarantor' parameter. Is that what you mean? If so, I'd like that to be part of the conenct as opposed to a separate function. Tony