changeset 91:cdaaf4792c22 v2

code cleanup
author cin
date Tue, 14 Oct 2014 09:30:45 +0400
parents efcb076407a7
children 4c0e5ef99986
files Implab/Implab.csproj Implab/ObjectPool.cs Implab/ObjectPoolWrapper.cs
diffstat 3 files changed, 0 insertions(+), 30 deletions(-) [+]
line wrap: on
line diff
--- a/Implab/Implab.csproj	Sun Oct 12 16:50:34 2014 +0400
+++ b/Implab/Implab.csproj	Tue Oct 14 09:30:45 2014 +0400
@@ -141,7 +141,6 @@
     <Compile Include="TransientPromiseException.cs" />
     <Compile Include="SyncContextPromise.cs" />
     <Compile Include="ObjectPool.cs" />
-    <Compile Include="ObjectPoolWrapper.cs" />
   </ItemGroup>
   <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
   <ItemGroup />
--- a/Implab/ObjectPool.cs	Sun Oct 12 16:50:34 2014 +0400
+++ b/Implab/ObjectPool.cs	Tue Oct 14 09:30:45 2014 +0400
@@ -23,11 +23,6 @@
         protected ObjectPool() : this(Environment.ProcessorCount+1) {
         }
 
-        public ObjectPoolWrapper<T> AllocateAuto() {
-
-            return new ObjectPoolWrapper<T>(Allocate(), this);
-        }
-
         public T Allocate() {
             if (m_disposed)
                 throw new ObjectDisposedException(ToString());
--- a/Implab/ObjectPoolWrapper.cs	Sun Oct 12 16:50:34 2014 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,24 +0,0 @@
-using System;
-
-namespace Implab {
-    public class ObjectPoolWrapper<T> : IDisposable {
-        readonly T m_value;
-        readonly ObjectPool<T> m_pool;
-
-        internal ObjectPoolWrapper(T value, ObjectPool<T> pool) {
-            m_value = value;
-            m_pool = pool;
-        }
-
-        public T Value {
-            get { return m_value; }
-        }
-
-        #region IDisposable implementation
-        public void Dispose() {
-            m_pool.Release(m_value);
-        }
-        #endregion
-    }
-}
-