public void Dispose() { if (FieldCache != null) { FieldCache.Clear(); } if (headerArea != null) { headerArea.Dispose(); } if (recordList != null) { recordList.Dispose(); } if (Registries != null) { Registries.Dispose(); } if (indexSetStore != null) { indexSetStore.Dispose(); } if (Store != null) { if (StoreSystem.CloseStore(Store)) { Store.Dispose(); } } headerArea = null; recordList = null; Registries = null; indexSetStore = null; }
private void CreateTable() { // Initially set the table sequence_id to 1 sequenceId = 1; // Create and open the store. // TODO: have a table-level configuration? Store = StoreSystem.CreateStore(StoreName, new Configuration()); try { Store.Lock(); // Setup the list structure recordList = new FixedRecordList(Store, 12); } finally { Store.Unlock(); } // Initialize the store to an empty state, SetupInitialStore(); indexSetStore.PrepareIndexes(TableInfo.Columns.Count + 1, 1, 1024); }