namespace IFramework
{
///
/// 有容量的对象池
///
///
public abstract class CapicityPool: ObjectPool
{
private int _capcity;
///
/// 存储容量
///
public int capcity { get { return _capcity; } set { _capcity = value; } }
///
/// Ctor
///
///
protected CapicityPool(int capcity) : base() { this._capcity = capcity; }
///
/// 回收,当数量超过回收失败
///
///
///
///
protected override bool OnSet(T t, IEventArgs arg)
{
return count <= capcity;
}
}
}