##// END OF EJS Templates
fixed JSONXmlReader disposing under ugly mono...
fixed JSONXmlReader disposing under ugly mono ObjectPool is made abstract

File last commit:

r84:34bb2f32634d v2
r85:abe260860bd6 v2
Show More
ObjectPoolWrapper.cs
24 lines | 514 B | text/x-csharp | CSharpLexer
/ Implab / ObjectPoolWrapper.cs
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
}
}