private void run(object _mode) { tracking_mode = (MODE)_mode; // get the meter's mode parser = new Parser(this); group = new Group(); // the players group, with who use it effect_tracker = new OverTimeEffectTracker(); // the DOT and HOT tracker pet_tracker = new PetTracker(); // Pet Tracker if (tracking_mode == MODE.LIVE) { // scan the previous lines of log file, to get the current group members if (Config.get_scan_previos_session_on_startup()) { Replay r = new Replay(Replay.MODE.IGNORE_COMBAT, Config.get_game_log_path()); r.Dispose(); } log_tracker = new LiveTracker(); // init the log reader & file watcher } else if (tracking_mode == MODE.REPLAY) { Replay r = new Replay(Replay.MODE.NORMAL, Config.get_game_log_path()); r.Dispose(); } else if (tracking_mode == MODE.REPLAY_DEBUG) { Replay r = new Replay(Replay.MODE.DEBUG, Config.get_game_log_path()); r.Dispose(); } }
protected virtual void Dispose(bool disposing) { if (!disposed) { if (disposing) { if (thread != null) { thread.Abort(); thread = null; } if (parser != null) { parser.Dispose(); parser = null; } if (group != null) { group.Dispose(); group = null; } if (effect_tracker != null) { effect_tracker.Dispose(); effect_tracker = null; } if (pet_tracker != null) { pet_tracker.Dispose(); pet_tracker = null; } if (log_tracker != null) { log_tracker.Dispose(); log_tracker = null; } Meter.active_meter = null; GC.Collect(); } } disposed = true; }