1 write to _weakHandlesByHashCode
Microsoft.NET.StringTools (1)
WeakStringCache.Concurrent.cs (1)
23_weakHandlesByHashCode = new ConcurrentDictionary<int, StringWeakHandle>(Environment.ProcessorCount, _initialCapacity);
9 references to _weakHandlesByHashCode
Microsoft.NET.StringTools (9)
WeakStringCache.Concurrent.cs (6)
44ConcurrentDictionary<int, StringWeakHandle> stringsByHashCode = usingWeakHandle ? _weakHandlesByHashCode : _stringsByHashCode; 109_scavengeThreshold = _weakHandlesByHashCode.Count * 2; 115_count = _weakHandlesByHashCode.Count; 130foreach (KeyValuePair<int, StringWeakHandle> entry in _weakHandlesByHashCode) 133if (!entry.Value.IsUsed && _weakHandlesByHashCode.TryRemove(entry.Key, out StringWeakHandle? removedHandle)) 139if (!removedHandle.IsUsed || !_weakHandlesByHashCode.TryAdd(entry.Key, removedHandle))
WeakStringCache.cs (3)
138foreach (KeyValuePair<int, StringWeakHandle> entry in _weakHandlesByHashCode) 144_weakHandlesByHashCode.Clear(); 159foreach (KeyValuePair<int, StringWeakHandle> entry in _weakHandlesByHashCode)