protected virtual void Reset() { Stop(); state = State.NotStarted; if (stateMachine != null) { stateMachinePool.Release(stateMachine); stateMachine = null; } parent = null; manager = null; }
/// <summary> Release a resumer to the pool. </summary> public static void ReleaseResumer(IResumer resumer) { (resumer as Resumer).Reset(); resumerPool.Release(resumer); }
/// <summary> Release routine back to pool. </summary> public static void Release(RoutineBase routine) { routine.Reset(); pool.Release(routine); }