DBreeze.Scheme.Dispose C# (CSharp) Method

Dispose() public method

public Dispose ( ) : void
return void
        public void Dispose()
        {
            if (_disposed)
                return;

            _disposed = true;

            _sync_openTablesHolder.EnterWriteLock();
            try
            {
                foreach (var row in _openTablesHolder)
                {
                    //Disposes all Ltrie, with storages and rollbacks
                    row.Value.Dispose();
                }

                //Clear self
                _openTablesHolder.Clear();

                //Disposing Schema trie
                if (LTrie != null)
                {
                    LTrie.Dispose();
                }
                //LTrieStorage.Dispose();
            }
            finally
            {
                _sync_openTablesHolder.ExitWriteLock();
            }
        }

Usage Example

        /// <summary>
        /// Dispose
        /// </summary>
        public void Dispose()
        {
            if (disposed)
            {
                return;
            }

            DBisOperable       = false;
            DBisOperableReason = "DBreezeEngine.Dispose";
            disposed           = true;

            //Disposing all transactions
            _transactionsCoordinator.StopEngine();

            //Disposing Schema
            DBreezeSchema.Dispose();

            //Disposing Trnsactional Journal, may be later move journal into transactionsCoordinator
            _transactionsJournal.Dispose();

            //Disposing Configuration
            Configuration.Dispose();

            //MUST BE IN THE END OF ALL.Disposing transaction locker
            _transactionTablesLocker.Dispose();

            //Disposing DeferredIndexer
            DeferredIndexer.Dispose();
        }
All Usage Examples Of DBreeze.Scheme::Dispose