
3 Nov
2010
3 Nov
'10
6:03 p.m.
Yes I tried that. But at my code async operations got triggered with errors from io_service thread and the acceptor objects was destroyed already.
When you use async. approach, the best way to manage your objects lifetime is to use shared_from_this idiom, just like in asio examples. This way you ensure that your completion handlers never "hit" destroyed objects.