mirror of
https://github.com/shaka-project/shaka-player.git
synced 2026-06-16 16:16:40 +03:00
0a59da4146
Although DownloadManager clears the segment list as soon as it has started the download Promise chain, the entire list is bound into the each download function. This is subtle and difficult to address directly. Instead, we set the segment data to null explicitly after the segment is stored. In this way, we are sure to only have one segment buffer in memory at a time during a storage operation. Note that there is no regression test to go along with this, because ArrayBuffer memory consumption cannot be directly instrumented from JavaScript, weak references cannot be used to track which buffers are garbage collected, and the buffer references are bound into anonymous functions and therefore cannot be found by exploring object hierarchies. Closes #1167 Change-Id: Ifeccbfb2d15a1a0243524c92e36512f9308fd5c6