$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-users] [asio] What happens when a deadline_timer is deleted
From: Bjarne Laursen (bla_at_[hidden])
Date: 2009-09-01 02:34:12
If I have a deadline_timer in my class and my class is deleted, the
compleetion function will be called (with error code). But as the
destructor have already been run I guess that the 'this' pointer will be
invalid! Is this safe? What if my compleetion function is virtual?
timer.async_wait(boost::bind(&MyClass::OnTimer, this,
boost::asio::placeholders::error));
--