[cronet] Fix leak of dispatch_semaphore_t in CronetTestBase
The class CronetTestBase allocate a dispatch_semaphore_t to wait for each task completion but does not destroy those semaphores in -reset method. This means that there is an ever growing cache of semaphores (also known as a leak). Destroy the semaphores when the wait has been successful (as it won't be possible for the semaphore to be re-signaled until the main thread get the control back anyway). Bug: none Change-Id: I8fc54597066f1662323737fdeb5cabc5285dc03c Cq-Include-Trybots: luci.chromium.try:ios-simulator-cronet Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2851237 Reviewed-by:Richard Coles <torne@chromium.org> Reviewed-by:
Zhongyi Shi <zhongyi@chromium.org> Commit-Queue: Richard Coles <torne@chromium.org> Auto-Submit: Sylvain Defresne <sdefresne@chromium.org> Cr-Commit-Position: refs/heads/master@{#880993}
Loading
Please register or sign in to comment