public void ReleasePathCache(Dictionary <StringSegment, object> pathCache, Dictionary <int, object> pathCacheByIndex) { if (_numberOfAllocatedPathCaches < _allocatePathCaches.Length - 1 && pathCache.Count < 256) { pathCache.Clear(); pathCacheByIndex.Clear(); _allocatePathCaches[++_numberOfAllocatedPathCaches] = new PathCacheHolder(pathCache, pathCacheByIndex); } }
public void ReleasePathCache(Dictionary <StringSegment, object> pathCache, Dictionary <int, object> pathCacheByIndex) { if (_used >= _items.Length - 1 || pathCache.Count >= 256) { return; } pathCache.Clear(); pathCacheByIndex.Clear(); _items[++_used] = new PathCacheHolder { ByIndex = pathCacheByIndex, Path = pathCache }; }