FastLED 3.9.15
Loading...
Searching...
No Matches

◆ clear()

void fl::IdTracker::clear ( )

Clear all tracked pointers and reset ID counter.

Thread-safe.

Definition at line 72 of file id_tracker.cpp.hpp.

72 {
73 // Lock for thread safety
74 mMutex.lock();
75
76 mPointerToId.clear();
77 mNextId = 0; // Reset ID counter to start at 0
78
79 mMutex.unlock();
80}
fl::flat_map< void *, int > mPointerToId
Definition id_tracker.h:91
fl::mutex mMutex
Definition id_tracker.h:88

References FL_NOEXCEPT, mMutex, mNextId, and mPointerToId.

Referenced by IdTracker().

+ Here is the caller graph for this function: