MCPcopy Create free account
hub / github.com/OpenShot/libopenshot / Clear

Method Clear

src/CacheMemory.cpp:224–237  ·  view source on GitHub ↗

Clear the cache of all frames

Source from the content-addressed store, hash-verified

222
223// Clear the cache of all frames
224void CacheMemory::Clear()
225{
226 // Create a scoped lock, to protect the cache from multiple threads
227 const std::lock_guard<std::recursive_mutex> lock(*cacheMutex);
228
229 frames.clear();
230 frame_numbers.clear();
231 frame_numbers.shrink_to_fit();
232 ordered_frame_numbers.clear();
233 ordered_frame_numbers.shrink_to_fit();
234 needs_range_processing = true;
235 // Trim freed arenas back to OS after large clears (debounced)
236 TrimMemoryToOS();
237}
238
239// Count the frames in the queue
240int64_t CacheMemory::Count()

Callers

nothing calls this directly

Calls 2

TrimMemoryToOSFunction · 0.85
clearMethod · 0.45

Tested by

no test coverage detected