MCPcopy Create free account
hub / github.com/FastLED/FastLED / cleanupSharedContext

Function cleanupSharedContext

tests/fl/audio/detector/vocal_real_audio.hpp:45–50  ·  view source on GitHub ↗

Scope guard that clears audio::Context history on test exit, preventing state leakage between test cases while preserving the expensive audio::fft::FFT kernel cache.

Source from the content-addressed store, hash-verified

43// preventing state leakage between test cases while preserving
44// the expensive audio::fft::FFT kernel cache.
45static void cleanupSharedContext() {
46 auto& ctx = sharedAudioContext();
47 if (ctx) {
48 ctx->clearCache();
49 }
50}
51
52#define VOCAL_TEST_CLEANUP auto cleanup = fl::make_scope_exit(cleanupSharedContext)
53

Callers

nothing calls this directly

Calls 1

clearCacheMethod · 0.45

Tested by

no test coverage detected