Beispiel #1
0
        public void Dispose()
        {
            SRefMultiple sref = _sizedRefMultiple;

            if (sref != null && Interlocked.CompareExchange(ref _sizedRefMultiple, null, sref) == sref)
            {
                sref.Dispose();
            }
            s_memoryCacheManager?.ReleaseCache(_memoryCache);
        }
        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);
            }
        }
Beispiel #3
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);
            }
        }