
Hello Igor, Thank you for quick response. But it requires of changing construction model. What if I want allocate objects at stack? May be there are some technique which doesn't require from user to use shared_ptr technique? For example why boost::asio::deadline_timer::~deadline_timer doesn't wait completion of WaitHandler? Or is it bad way to wait smth in a destructor? Thank you, Daniel
I've noticed that WaitHandler can be called after boost::asio::deadline_timer destruction. It may cause using of uninitialized data. Are there any other solutions of graceful destruction of boost::asio::deadline_timer to be sure that after this destruction WaitHandler will never be called?
Yes, the solution is to use shared_from_this idiom. _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users