/// <summary> /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. /// </summary> /// <param name="callFromDispose"> /// The call From Dispose. /// </param> public void Dispose(bool callFromDispose) { if (this.IsDisposed) { return; } IsDisposed = true; if (this.unmanagedHandle != IntPtr.Zero) { MarshalHunspellDll.HunspellFree(this.unmanagedHandle); this.unmanagedHandle = IntPtr.Zero; } if (this.nativeDllIsReferenced) { MarshalHunspellDll.UnReferenceNativeHunspellDll(); this.nativeDllIsReferenced = false; } if (callFromDispose) { GC.SuppressFinalize(this); } }
/// <summary> /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. /// </summary> public void Dispose() { if (!this.IsDisposed) { MarshalHunspellDll.HunspellFree(this.unmanagedHandle); this.unmanagedHandle = IntPtr.Zero; } }
/// <summary> /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. /// </summary> /// <param name="callFromDispose"> /// The call From Dispose. /// </param> protected virtual void Dispose(bool callFromDispose) { if (this.IsDisposed) { return; } IsDisposed = true; if (this.unmanagedHandle != IntPtr.Zero) { MarshalHunspellDll.HunspellFree(this.unmanagedHandle); this.unmanagedHandle = IntPtr.Zero; } if (this.nativeDllIsReferenced) { MarshalHunspellDll.UnReferenceNativeHunspellDll(); this.nativeDllIsReferenced = false; } }