Clear the cache of all frames
| 222 | |
| 223 | // Clear the cache of all frames |
| 224 | void 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 |
| 240 | int64_t CacheMemory::Count() |
nothing calls this directly
no test coverage detected