Example #1
0
 public MemoryDatabase(int hashSize)
 {
     store = new HeapStore(hashSize);
     branchNodeSize = 16;
     leafNodeSize = 4010;
     heapNodeCacheSize = 14 * 1024 * 1024;
     branchNodeCacheSize = 2 * 1024 * 1024;
 }
Example #2
0
        public void Stop()
        {
            CheckPoint();

            lock (lockObject) {
                // We can't stop a database that hasn't started
                if (databaseStarted == false || treeSystem == null)
                    return;

                // Offer up all the internal objects to the GC
                store = null;

                // Clear the internal state
                treeSystem = null;
                databaseStarted = false;
            }
        }