예제 #1
0
        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();
        }
예제 #2
0
        protected void DisposeFuturesForProcess(ProcessInfo process)
        {
            OwnedFutureSet of = null;

            if (_OwnedFutures.TryGetValue(process, out of))
            {
                _OwnedFutures.Remove(process);
                of.Dispose();
            }
        }