id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 5285,problem about boost::asio::ip::tcp::resolver,gong yiling ,chris_kohlhoff," one day i found a bug in my project, that's one of async_resolve's callback never called. i checked this problem and repeat this problem as following program: {{{ #include ""stdafx.h"" #include #include #include #include using namespace boost::asio; using namespace boost; class client { public: client(io_service& ios): m_ios(ios), m_resolver(ios) { ip::tcp::resolver* resolver = new ip::tcp::resolver(m_ios); delete resolver; ip::tcp::resolver::query query(""www.baidu.com"",""80""); m_resolver.async_resolve(query,boost::bind(&client::handle_resolve,this,_1,_2)); } void handle_resolve(const system::error_code& ec,ip::tcp::resolver_iterator it) { puts(""see me?""); } io_service& m_ios; ip::tcp::resolver m_resolver; }; int _tmain(int argc, _TCHAR* argv[]) { io_service ios; client* c = new client(ios); ios.run(); return 0; } }}} i digged into the source code( in function boost.asio.detail.resolver_service.destroy ) it seems when i delete a temporary created resolver, the resolver's work service will be stopped. and thus client::handle_resolve will never be called. thx ",Bugs,closed,To Be Determined,asio,Boost 1.45.0,Problem,worksforme,,