static ScopeCounters() { _cache = new ScopeGlobalCounter[byte.MaxValue + 1]; for (byte i = byte.MaxValue; ; i--) { _cache[i] = new ScopeGlobalCounter(i); if (i == 0) { break; } } }
/// <summary>Decrements the reference count of a global scope</summary> /// <param name="scope">The global scope</param> private static void ReleaseOne(ScopeGlobalCounter scope) { Interlocked.Decrement(ref scope._count); }