diff --git a/AUTHORS b/AUTHORS index 8e7e1830a4..83a74af633 100644 --- a/AUTHORS +++ b/AUTHORS @@ -61,6 +61,7 @@ Hans Knoechel Korniltsev Anatoly Todd Wong Maxim Pavlov +Yusuke Suzuki &yet LLC <*@andyet.com> Agora IO <*@agora.io> diff --git a/call/bitrate_estimator_tests.cc b/call/bitrate_estimator_tests.cc index 313533a7ad..6b69bc069b 100644 --- a/call/bitrate_estimator_tests.cc +++ b/call/bitrate_estimator_tests.cc @@ -136,13 +136,11 @@ class BitrateEstimatorTest : public test::CallTest { virtual void TearDown() { task_queue_.SendTask([this]() { - std::for_each(streams_.begin(), streams_.end(), - std::mem_fun(&Stream::StopSending)); - - while (!streams_.empty()) { - delete streams_.back(); - streams_.pop_back(); + for (auto* stream : streams_) { + stream->StopSending(); + delete stream; } + streams_.clear(); send_transport_.reset(); receive_transport_.reset();