Dispose() protected method

protected Dispose ( bool disposing ) : void
disposing bool
return void
示例#1
0
 private void Destroy(PooledStream pooledStream)
 {
     if (pooledStream != null)
     {
         try
         {
             lock (this.m_ObjectList.SyncRoot)
             {
                 this.m_ObjectList.Remove(pooledStream);
                 this.m_TotalObjects = this.m_ObjectList.Count;
             }
         }
         finally
         {
             pooledStream.Dispose();
         }
     }
 }
示例#2
0
        /// <summary>
        ///    <para>Destroys a pooled stream from the pool</para>
        /// </summary>
        private void Destroy(PooledStream pooledStream)
        {
            GlobalLog.Print("Destroy pooledStream#" + ValidationHelper.HashString(pooledStream));

            if (null != pooledStream)
            {
                try
                {
                    lock (m_ObjectList.SyncRoot) {
                        m_ObjectList.Remove(pooledStream);
                        m_TotalObjects = m_ObjectList.Count;
                    }
                }
                finally
                {
                    pooledStream.Dispose();
                }
            }
        }
示例#3
0
        /// <summary>
        ///    <para>Destroys a pooled stream from the pool</para>
        /// </summary>
        private void Destroy(PooledStream pooledStream) {
            GlobalLog.Print("Destroy pooledStream#"+ValidationHelper.HashString(pooledStream));

            if (null != pooledStream) {
                try
                {
                    lock (m_ObjectList.SyncRoot) {
                        m_ObjectList.Remove(pooledStream);
                        m_TotalObjects = m_ObjectList.Count;
                    }
                }
                finally
                {
                    pooledStream.Dispose();
                }
            }
        }
 private void Destroy(PooledStream pooledStream)
 {
     if (pooledStream != null)
     {
         try
         {
             lock (this.m_ObjectList.SyncRoot)
             {
                 this.m_ObjectList.Remove(pooledStream);
                 this.m_TotalObjects = this.m_ObjectList.Count;
             }
         }
         finally
         {
             pooledStream.Dispose();
         }
     }
 }