public void Stop() { // Check point before we stop CheckPoint(); lock (lockObject) { // We can't stop a database that hasn't started if (databaseStarted == false || treeSystem == null) { return; } // Close the store fileStore.Close(); // Stop the buffer manager bufferManager.Stop(); // Offer up all the internal objects to the GC bufferManager = null; fileStore = null; // Clear the internal state treeSystem = null; databaseStarted = false; } }