Use SingleThreadExecutor to release AudioTracks
We currently start a simple Thread to release AudioTracks asynchronously. If many AudioTracks are released at the same time, this may lead to OOM situations because we attempt to create multiple new threads. This can be improved by using a shared SingleThreadExecutor. In the simple case of one simmultaneous release, it's exactly the same behavior as before: create a thread and release it as soon as it's done. For multiple simultanous releases we get the advantage of sharing a single thread to avoid creating more than one at the same time. Issue: google/ExoPlayer#10057 PiperOrigin-RevId: 460698942
Showing
with
43 additions
and
15 deletions
Please
register
or
sign in
to comment