【发布时间】:2011-06-09 07:07:28
【问题描述】:
AuthConnection::AuthConnection(boost::asio::io_service& io_service)
:Connection(io_service)
{
boost::shared_ptr<AuthHandler>h (new AuthHandler( shared_from_this() ));
this->handler=h;
}
shared_from_this() 应该返回 Connection 的 ptr,但它抛出了这个异常
tr1::bad_weak_ptr
我不知道这里出了什么问题!
【问题讨论】:
标签: c++ boost-asio shared-ptr