public void Close() { if (_window != null) { _profilerRunning = false; _window.Close(); _window.Dispose(); } _window = null; }