public TimerImplement Create() { TimerImplement imp; if (pool.Count <= 0) { imp = new TimerImplement(); return(imp); } imp = pool[pool.Count - 1]; pool.RemoveAt(pool.Count - 1); return(imp); }
public void Recycle(TimerImplement imp) { imp.Dispose(); pool.Add(imp); }