public virtual void CleanUp() {
if (LauncherProcess != null) {
LauncherProcess.Dispose();
LauncherProcess = null;
}
if (GameProcess == null) {
GameProcess = TryToGetGameProcess();
}
if (GameProcess != null) {
try {
if (!GameProcess.HasExitedSafe()) {
GameProcess.Kill();
}
} catch (Exception e) {
Logging.Warning("Process killing exception: " + e);
}
GameProcess.Dispose();
GameProcess = null;
}
}