示例#1
0
文件: DB.cs 项目: robpaveza/mc-mapper
        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();
            }
        }