зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1640369 - always close memory files in case GC doesn't. r=agi,geckoview-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D82056
This commit is contained in:
Родитель
3395ee63c9
Коммит
755140cbbf
|
@ -82,14 +82,16 @@ final class SamplePool {
|
|||
for (Sample s : mRecycledSamples) {
|
||||
disposeSample(s);
|
||||
}
|
||||
|
||||
mRecycledSamples.clear();
|
||||
|
||||
mBuffers.forEach((i, m) -> m.dispose());
|
||||
mBuffers.clear();
|
||||
}
|
||||
|
||||
private void disposeSample(final Sample sample) {
|
||||
if (sample.bufferId != Sample.NO_BUFFER) {
|
||||
mBuffers.remove(sample.bufferId);
|
||||
SampleBuffer s = mBuffers.remove(sample.bufferId);
|
||||
s.dispose();
|
||||
}
|
||||
sample.dispose();
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче