Mime EntityDispose Method
Definition
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
public void Dispose()Implements
IDisposableDisposeRemarks
Call Dispose when you are finished using the MimeEntity. The Dispose method leaves the MimeEntity in an unusable state. After calling Dispose, you must release all references to the MimeEntity so the garbage collector can reclaim the memory that the MimeEntity was occupying.
Structural descendants are disposed iteratively, in child-before-parent order, before this entity's Dispose(Boolean) method is called. If cleanup fails, the remaining descendants and this entity's cleanup are still attempted, then the exception is rethrown (or multiple exceptions are reported in an AggregateException). Calling Dispose again retries incomplete cleanup without repeating successful cleanup hooks. The tree must not be modified or disposed concurrently during disposal.