Dispose() private method

private Dispose ( ) : void
return void
        public void Dispose()
        {
            SRef sref = _sizedRef;

            if (sref != null && Interlocked.CompareExchange(ref _sizedRef, null, sref) == sref)
            {
                sref.Dispose();
            }
            IMemoryCacheManager memoryCacheManager = s_memoryCacheManager;

            if (memoryCacheManager != null)
            {
                memoryCacheManager.ReleaseCache(_memoryCache);
            }
        }
Exemplo n.º 2
0
        public void Dispose()
        {
            SRef comparand = this._sizedRef;

            if ((comparand != null) && (Interlocked.CompareExchange <SRef>(ref this._sizedRef, null, comparand) == comparand))
            {
                comparand.Dispose();
            }
            IMemoryCacheManager manager = s_memoryCacheManager;

            if (manager != null)
            {
                manager.ReleaseCache(this._memoryCache);
            }
        }