Dispose() 공개 메소드

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
리턴 void
예제 #1
0
 /// <summary>
 ///     Stop tracking a timer, and kill it
 /// </summary>
 /// <param name="t">The timer to forget and kill</param>
 public void RemoveTimer(ref WrappedTimer t)
 {
     lock (heardof)
     {
         if (heardof.Contains(t))
         {
             heardof.Remove(t);
         }
     }
     t.Dispose();
     t = null;
 }
예제 #2
0
 /// <summary>
 ///     Stop tracking a timer, and kill it
 /// </summary>
 /// <param name="t">The timer to forget and kill</param>
 public void RemoveTimer(ref WrappedTimer t)
 {
     lock (heardof)
     {
         if (heardof.Contains(t))
             heardof.Remove(t);
     }
     t.Dispose();
     t = null;
 }