Dispose() public method

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
return void
Ejemplo n.º 1
0
 private static void TurnOffLogging(object sender, EventArgs args)
 {
     // Reset logging configuration to null; this causes old configuration (if any) to be
     // closed.
     InternalLogger.Info("Shutting down logging...");
     if (Configuration != null)
     {
         Configuration = null;
         factory.Dispose();      // Release event listeners
     }
     CurrentAppDomain = null;    // No longer part of AppDomains
     InternalLogger.Info("Logger has been shut down.");
 }