src/openSourceC.DotNetLibrary.Windows/ServiceProcess/ServiceApplicationBase.cs
/// <summary>
///		Disposes of the resources (other than memory) used by the <see cref="T:ServiceBase"/>.
/// </summary>
/// <param name="disposing"><b>true</b> to release both managed and unmanaged resources;
///		<b>false</b> to release only unmanaged resources.</param>
Disposes of the resources (other than memory) used by the .
Disposes of the resources ( other than memory ) used by the .
protected override void Dispose(bool disposing)
		{
			if (disposing)
			{
				if (_singleUse != null)
				{
					lock (_singleUseLock)
					{
						if (_singleUse != null)
						{
							_singleUse.Dispose();
							_singleUse = null;
						}
					}
				}
				if (_processorThreads != null)
				{
					lock (_processorThreadsLock)
					{
						while (_processorThreads.Count != 0)
						{
							foreach (KeyValuePair<Thread, ServiceProcessorBase> processorThread in _processorThreads.ToArray())
							{
								if (!processorThread.Key.IsAlive || processorThread.Key.Join(10))
								{
									processorThread.Value.Dispose();
									_processorThreads.Remove(processorThread.Key);
								}
							}
							Thread.Sleep(100);
						}
						_processorThreads = null;
					}
				}
				Log.Message -= OscLog_Message;
				Message = null;
			}
			base.Dispose(disposing);
		}
protected override void Dispose ( bool disposing ) { if ( disposing ) { if ( _singleUse != null ) { lock ( _singleUseLock ) { if ( _singleUse != null ) { _singleUse . Dispose ( ) ; _singleUse = null ; } } } if ( _processorThreads != null ) { lock ( _processorThreadsLock ) { while ( _processorThreads . Count != 0 ) { foreach ( KeyValuePair < Thread , ServiceProcessorBase > processorThread in _processorThreads . ToArray ( ) ) { if ( ! processorThread . Key . IsAlive || processorThread . Key . Join ( 10 ) ) { processorThread . Value . Dispose ( ) ; _processorThreads . Remove ( processorThread . Key ) ; } } Thread . Sleep ( 100 ) ; } _processorThreads = null ; } } Log . Message -= OscLog_Message ; Message = null ; } base . Dispose ( disposing ) ; }
Disposes of the resources (other than memory) used by the .
Disposes of the resources ( other than memory ) used by the .
// Dispose of managed resources. // Remove the forwarding of messages from the logger to the Message event. // Dispose of unmanaged resources.
disposing
bool
None