diff --git a/include/boost/asio/awaitable.hpp b/include/boost/asio/awaitable.hpp index 43f80cf48..1ed3ac25d 100644 --- a/include/boost/asio/awaitable.hpp +++ b/include/boost/asio/awaitable.hpp @@ -81,7 +81,11 @@ class BOOST_ASIO_NODISCARD awaitable awaitable& operator=(awaitable&& other) noexcept { if (this != &other) + { + if (frame_) + frame_->destroy(); frame_ = std::exchange(other.frame_, nullptr); + } return *this; }