Does boost bind increment the ref count of a shared_ptr parameter for it's lifetime? For example, take the following code:
void myFunc(boost::shared_ptr<MyClass> in) {
in->doThing();
}
void myOtherFunc() {
{
boost::shared_ptr<MyClass> p = ...;
// A
boost::function<void(boost::shared_ptr<MyClass>)> f = boost::bind(&myFunc, p);
// B
}
// C
}
If bind does increment the ref count, ref should be 1 at A, 2 at B and 0 at C.