AcManager.Tools.Starters.BaseStarter.CleanUp C# (CSharp) Method

CleanUp() public method

public CleanUp ( ) : void
return void
        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;
            }
        }