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 71 of file id_tracker.cpp.

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

References mMutex, mNextId, and mPointerToId.