##// END OF EJS Templates
ServiceLocator: fixed services cleanup
ServiceLocator: fixed services cleanup

File last commit:

r84:34bb2f32634d v2
r88:c4877ae77cee 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
}
}