Skip to content

Commit 25e51d8

Browse files
author
Chris Kirmse
committed
free cache in FrameMapper::Close()
- this hugely reduces the memory used by rendering a timeline with a lot of clips - could be related to issue #239
1 parent 42af4ca commit 25e51d8

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/FrameMapper.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -651,6 +651,16 @@ void FrameMapper::Close()
651651
// Close internal reader
652652
reader->Close();
653653

654+
// Clear the fields & frames lists
655+
fields.clear();
656+
frames.clear();
657+
658+
// Mark as dirty
659+
is_dirty = true;
660+
661+
// Clear cache
662+
final_cache.Clear();
663+
654664
// Deallocate resample buffer
655665
if (avr) {
656666
SWR_CLOSE(avr);

0 commit comments

Comments
 (0)