Dispose() public méthode

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
Résultat void
Exemple #1
0
 public void shutdown()
 {
     if (thread != null && !shutting_down)
     {
         shutting_down = true;
         poll_set.Dispose();
         poll_set = null;
         signals.Clear();
         if (!thread.Join(2000))
         {
             EDB.WriteLine("PollManager had 2 seconds to drink the coolaid, and didn't. Trying the \"funnel method\".");
             try
             {
                 thread.Abort();
             }
             catch (Exception ex)
             {
             }
         }
         thread = null;
     }
 }