diff --git a/Implab/Implab.csproj b/Implab/Implab.csproj --- a/Implab/Implab.csproj +++ b/Implab/Implab.csproj @@ -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 /> diff --git a/Implab/ObjectPool.cs b/Implab/ObjectPool.cs --- a/Implab/ObjectPool.cs +++ b/Implab/ObjectPool.cs @@ -23,11 +23,6 @@ namespace Implab { 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()); diff --git a/Implab/ObjectPoolWrapper.cs b/Implab/ObjectPoolWrapper.cs deleted file mode 100644 --- a/Implab/ObjectPoolWrapper.cs +++ /dev/null @@ -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 - } -} -