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

◆ size()

size_t fl::IdTracker::size ( )

Get the current number of tracked pointers.

Thread-safe.

Returns
Number of currently tracked pointers

Definition at line 61 of file id_tracker.cpp.

61 {
62 // Lock for thread safety
63 mMutex.lock();
64
65 size_t currentSize = mPointerToId.size();
66
67 mMutex.unlock();
68 return currentSize;
69}
fl::hash_map< void *, int > mPointerToId
Definition id_tracker.h:92
fl::mutex mMutex
Definition id_tracker.h:89

References mMutex, and mPointerToId.