When does an asio timer go out of scope?
- by ApplePieIsGood
What I mean is, let's say you do an async_wait on an asio timer and bind the update to a function that takes a reference to a type T. Let's say you created the T initially on the stack before passing it to async_wait. At the end of that async_wait, it calls async_wait itself, renewing the timer over and over. Does that stack allocated type T stay alive until the first time the timer doesn't renew itself, or after the first invocation of the function will the T go out of scope?