Boost logo

Boost :

Subject: [boost] Does async_accept only access connection object raw pointer and wrapped it by shared pointer internally?
From: hh h (jupiter.hce_at_[hidden])
Date: 2018-12-26 05:20:55

I don't like to use raw pointer by new and delete, but the following
code will be crashed by double delete, can't async_accept accept
shared pointer?

std::shared_ptr<session> new_session =
std::make_shared<session>(io_service_, context_);
boost::bind(&server::handle_accept, this, new_session.get(),

Thank you.

Boost list run by bdawes at, gregod at, cpdaniel at, john at