diff --git a/concurrency/mutexmap.go b/concurrency/mutexmap.go index 35936fd..b00868b 100644 --- a/concurrency/mutexmap.go +++ b/concurrency/mutexmap.go @@ -108,7 +108,7 @@ func (a *mutexMap[T]) Delete(key T) { func (a *mutexMap[T]) Clear() { a.lock.Lock() - a.items = make(map[T]*sync.RWMutex) + clear(a.items) a.lock.Unlock() }