示例#1
0
文件: DB.cs 项目: uxwine/leveldb.net
 protected override void FreeUnManagedObjects()
 {
     if (this.Handle != default(IntPtr))
     {
         LevelDBInterop.leveldb_close(this.Handle);
     }
 }
示例#2
0
        /// <summary>
        ///
        /// </summary>
        protected override void FreeUnManagedObjects()
        {
            if (this.Handle != default)
            {
#if DEBUG
                System.Diagnostics.Debug.WriteLine("Closing leveldb");
#endif
                LevelDBInterop.leveldb_close(this.Handle);
                this.Handle = default;
            }
        }
示例#3
0
文件: DB.cs 项目: bkwcl/LevelDB
        protected override void FreeUnManagedObjects()
        {
            if (this.Handle != default(IntPtr))
            {
                LevelDBInterop.leveldb_close(this.Handle);
            }

            // it's critical that the database be closed first, as the logger and cache may depend on it.

            if (this._Cache != null)
            {
                this._Cache.Dispose();
            }

            if (this._Comparator != null)
            {
                this._Comparator.Dispose();
            }

            if (this._InfoLog != null)
            {
                this._InfoLog.Dispose();
            }
        }