/// <summary> /// Release all resources /// </summary> /// <param name="disposing">Indicates user or GC calling this function</param> protected virtual void Dispose(bool disposing) { if (!this.disposed) { if (disposing) { if (logThread != null) { logThread.Dispose(); logThread = null; } if (logMsgList != null) { logMsgList.Dispose(); logMsgList = null; } if (this.logDistinationMap != null) { foreach (ILogDistination distination in this.logDistinationMap.Values) { distination.Dispose(); } } } //Note disposing has been done. this.disposed = true; } }