/// <summary> /// Memory cleanup when this control is unloaded /// </summary> public override void Dispose() { CurrentLoadedExport = null; CurrentME2ME3TalkFile = null; LoadedStrings?.Clear(); CleanedStrings?.ClearEx(); }
public override void LoadExport(ExportEntry exportEntry) { var tlkFile = new ME1Explorer.Unreal.Classes.TalkFile(exportEntry); // Setup object as TalkFile LoadedStrings = tlkFile.StringRefs.ToList(); //This is not binded to so reassigning is fine CleanedStrings.ClearEx(); //clear strings Ex does this in bulk (faster) CleanedStrings.AddRange(LoadedStrings.Where(x => x.StringID > 0).ToList()); //nest it remove 0 strings. CurrentLoadedExport = exportEntry; editBox.Text = NO_STRING_SELECTED; //Reset ability to save, reset edit box if export changed. FileModified = false; }