Boost logo

Boost Users :

Subject: Re: [Boost-users] [asio]How to insure async handles not be called after calling deadline_timer::cancel()?
From: Igor R (boost.lists_at_[hidden])
Date: 2010-10-12 09:23:12


> Does this mean that async handlers may be called after calling
> deadline_timer::cancel()

Yes.

> If yes, it seems make things unintuitive,  eg. delete the resources
> that associate with  handlers after cancel().

Don't delete these resources, bind them to a shared_ptr and they will
be released automatically after the handler invocation is complete.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net