示例#1
0
        /// <summary>
        /// The dispose.
        /// </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.HyphenFree(this.unmanagedHandle);
                this.unmanagedHandle = IntPtr.Zero;
            }

            if (this.nativeDllIsReferenced)
            {
                MarshalHunspellDll.UnReferenceNativeHunspellDll();
                this.nativeDllIsReferenced = false;
            }

            if (callFromDispose)
            {
                GC.SuppressFinalize(this);
            }
        }
示例#2
0
 /// <summary>
 /// The dispose.
 /// </summary>
 public void Dispose()
 {
     if (!this.IsDisposed)
     {
         MarshalHunspellDll.HyphenFree(this.unmanagedHandle);
         this.unmanagedHandle = IntPtr.Zero;
     }
 }
示例#3
0
        /// <summary>
        /// The dispose.
        /// </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.HyphenFree(this.unmanagedHandle);
                this.unmanagedHandle = IntPtr.Zero;
            }

            if (this.nativeDllIsReferenced)
            {
                MarshalHunspellDll.UnReferenceNativeHunspellDll();
                this.nativeDllIsReferenced = false;
            }
        }