diff --git a/strings/base_coroutine_foundation.h b/strings/base_coroutine_foundation.h index 311522a6c..43a8b16bd 100644 --- a/strings/base_coroutine_foundation.h +++ b/strings/base_coroutine_foundation.h @@ -118,8 +118,8 @@ namespace winrt::impl } private: - std::experimental::coroutine_handle<> m_handle; resume_apartment_context m_context; + std::experimental::coroutine_handle<> m_handle; void Complete() { @@ -743,7 +743,7 @@ WINRT_EXPORT namespace winrt auto [delegate, shared] = impl::make_delegate_with_shared_state>(shared_type{}); - auto completed = [&](T const& async) + auto completed = [delegate = std::move(delegate)](T const& async) { async.Completed(delegate); };