problematic example:
class A
{
public:
void func1(){throw bad_alloc();};
void func2()
{
try
{
int i;
shared_ptr<void> shutdown(static_cast<void*>(0), bind(&A::func1, this));
}
catch(...)
{};
};
};
int main()
{
A a1;
a1.func2();
}
This problem has nothing to do with bind (which doesn't allocate memory).
Throwing from a deleter is a no-no (and generally a bad design), since the only time it gets called is by shared_ptr's destructor. Don't do that. This is very likely to be a terminating condition using std::shared_ptr in C++0x.
--
Nevin ":-)" Liber <mailto: