Dispose() public method

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
return void
Ejemplo n.º 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;
 }
Ejemplo n.º 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;
 }