public void Dispose() { Snapshots.Clear(); var databasePath = Database.Storage.Folder; Database.Dispose(); if (DatabaseIsTemporary) { Directory.Delete(databasePath, true); } foreach (var fn in TemporaryFiles) { try { File.Delete(fn); } catch { } } TemporaryFiles.Clear(); if (Process != null) { Process.Dispose(); Process = null; } Futures.Dispose(); }
protected void DisposeFuturesForProcess(ProcessInfo process) { OwnedFutureSet of = null; if (_OwnedFutures.TryGetValue(process, out of)) { _OwnedFutures.Remove(process); of.Dispose(); } }