The function iterated over two containers, destroyed their elements and popped those elements one at a time. It's more efficient to destroy all of the elements, then clear() the container. Bug: None Change-Id: I17aa88694ee41df64c5793b08b96899b7ff04071 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133901 Reviewed-by: Erik Språng <sprang@webrtc.org> Commit-Queue: Elad Alon <eladalon@webrtc.org> Cr-Commit-Position: refs/heads/master@{#27730}