public static void Init() { _ErrorLog = new CErrorLogFile(CSettings.FileNameErrorLog, "Error-Log"); _PerformanceLog = new CLogFile(CSettings.FileNamePerformanceLog, "Performance-Log"); _BenchmarkLog = new CLogFile(CSettings.FileNameBenchmarkLog, "Benchmark-Log"); _DebugLog = new CLogFile(CSettings.FileNameDebugLog, "Debug-Log"); _SongInfoLog = new CLogFile(CSettings.FileNameSongInfoLog, "Song-Information-Log"); _BenchmarkTimer = new Stopwatch[_MaxBenchmarks]; for (int i = 0; i < _BenchmarkTimer.Length; i++) { _BenchmarkTimer[i] = new Stopwatch(); } _BenchmarksRunning = 0; _Initialized = true; }
public static void Close() { if (_Initialized) { _ErrorLog.Dispose(); _ErrorLog = null; _PerformanceLog.Dispose(); _PerformanceLog = null; _BenchmarkLog.Dispose(); _BenchmarkLog = null; _DebugLog.Dispose(); _DebugLog = null; _SongInfoLog.Dispose(); _SongInfoLog = null; _Initialized = false; } }