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