public override void Dispose()
 {
     if (pool != null)
     {
         pool.Dispose();
     }
 }
Beispiel #2
0
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         m_pool.Dispose();
     }
 }
Beispiel #3
0
 protected override void Dispose(bool explicitDispose)
 {
     if (explicitDispose)
     {
         _dataContextPool?.Dispose();
         _referenceKeyProvider?.Dispose();
     }
     _dataContextPool              = null;
     _dataContextPoolingSettings   = null;
     _efDbContextOptions           = null;
     _referenceKeyProviderSettings = null;
     _referenceKeyProvider         = null;
     _serviceProvider              = null;
     //
     base.Dispose(explicitDispose);
 }
    private void LateUpdate()
    {
        //检查并回收垃圾
        this.checkTimeCache += Time.deltaTime;
        if (this.checkTimeCache > 1f)
        {
            foreach (var item in mPools)
            {
                //执行内部update
                //如果可以删除就遵循删除策略删除
                item.Value.Flush(this.checkTimeCache);
                if (item.Value.IsDisposeable)
                {
                    this.disposeCache.Add(item.Key);
                }
            }
            this.checkTimeCache = 0f;
            for (int i = 0; i < this.disposeCache.Count; i++)
            {
                AssetID temp = this.disposeCache[i];
                if (mPools.ContainsKey(temp))
                {
                    IPool pool = mPools[temp];
                    mPools.Remove(temp);
                    pool.Dispose();
                }
            }
            this.disposeCache.Clear();
        }

        //检查加载队列并回调
        while (allLoad.Count > 0)
        {
            CheckLoadQueue(allLoad.Dequeue());
        }
    }
Beispiel #5
0
 public void Dispose()
 {
     socketPool.Dispose();
 }
Beispiel #6
0
 public override void Dispose()
 {
     _subpool.Dispose();
     base.Dispose();
 }
Beispiel #7
0
 public void Dispose()
 {
     this.LogEventWritten = null;
     _Pool?.Dispose();
 }
Beispiel #8
0
 public void TestDispose()
 {
     managerMock.Expect(m => m.Dispose());
     pool.Dispose();
 }
Beispiel #9
0
 /// <summary>
 /// Closes all connections to Memcached and cleans up any other resources that may be in use.
 /// </summary>
 public void Dispose()
 {
     _pool.Dispose();
 }
 public override void Dispose()
 {
     pool.Dispose();
 }