MailKit.Net.Imap.ImapClient.Dispose C# (CSharp) Method

Dispose() protected method

Releases the unmanaged resources used by the ImapClient and optionally releases the managed resources.
Releases the unmanaged resources used by the ImapClient and optionally releases the managed resources.
protected Dispose ( bool disposing ) : void
disposing bool true to release both managed and unmanaged resources; /// false to release only the unmanaged resources.
return void
		protected override void Dispose (bool disposing)
		{
			if (disposing && !disposed) {
				engine.Dispose ();

#if NETFX_CORE
				if (socket != null)
					socket.Dispose ();
#endif

				disposed = true;
			}

			base.Dispose (disposing);
		}
	}