LightningDB.LightningDatabase.Dispose C# (CSharp) Méthode

Dispose() protected méthode

Deallocates resources opened by the database.
protected Dispose ( bool disposing ) : void
disposing bool true if called from Dispose.
Résultat void
        protected virtual void Dispose(bool disposing)
        {
            if (_handle == default(uint))
                return;

            if(!disposing)
                throw new InvalidOperationException("The LightningDatabase was not disposed and cannot be reliably dealt with from the finalizer");

            Environment.Disposing -= Dispose;
            IsOpened = false;
            _pinnedConfig.Dispose();
            mdb_dbi_close(Environment.Handle(), _handle);
            GC.SuppressFinalize(this);
            _handle = default(uint);
        }

Same methods

LightningDatabase::Dispose ( ) : void