I noticed something strange. I expect a segfault to be produced running the following code, but it isn't.
void DeadlineTimeOut(const boost::system::error_code& pErrorCode, boost::thread* pThread)
{
std::cout << "Error code: #" << pErrorCode.value()
<< " Message: " << pErrorCode.message() << std::endl;
std::cout << "Thread Address = "
<< pThread << std::endl; // "sth. like 0x33aabc0"
pThread->interrupt();
pThread->join();
delete pThread;
delete pThread;
std::cout << "Stopped execution thread #"
<< pThread->get_id() << std::endl; // "{Not-any-thread}"
}
So, why is the double delete possible? And also calling a member? I'm a little confused at the moment.