diff --git a/Changelog.txt b/Changelog.txt index 82f8b02..17a0671 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -1,5 +1,8 @@ ChangeLog +1.1.6.4 + Fixed memory leak caused by not removing callbacks from GameEvents + 1.1.6.3 Renamed DLL for CKAN compatibility Added AssemblyFileVersion diff --git a/GameData/PartCommanderContinued/PartCommanderContinued.version b/GameData/PartCommanderContinued/PartCommanderContinued.version index 1321b99..adb59ea 100644 --- a/GameData/PartCommanderContinued/PartCommanderContinued.version +++ b/GameData/PartCommanderContinued/PartCommanderContinued.version @@ -10,7 +10,7 @@ "MAJOR": 1, "MINOR": 1, "PATCH": 6, - "BUILD": 3 + "BUILD": 4 }, "KSP_VERSION": { "MAJOR": 1, diff --git a/PartCommanderContinued.version b/PartCommanderContinued.version index 1321b99..adb59ea 100644 --- a/PartCommanderContinued.version +++ b/PartCommanderContinued.version @@ -10,7 +10,7 @@ "MAJOR": 1, "MINOR": 1, "PATCH": 6, - "BUILD": 3 + "BUILD": 4 }, "KSP_VERSION": { "MAJOR": 1, diff --git a/PartCommanderContinued/AssemblyVersion.cs b/PartCommanderContinued/AssemblyVersion.cs index 0b794a2..4afd0c9 100644 --- a/PartCommanderContinued/AssemblyVersion.cs +++ b/PartCommanderContinued/AssemblyVersion.cs @@ -1,14 +1,9 @@  - - - - - // This code was generated by a tool. Any changes made manually will be lost // the next time this code is regenerated. // using System.Reflection; - [assembly: AssemblyVersion("1.1.6.3")] - [assembly: AssemblyFileVersion("1.1.6.3")] + [assembly: AssemblyVersion("1.1.6.4")] + [assembly: AssemblyFileVersion("1.1.6.4")] diff --git a/PartCommanderContinued/PartCommander.cs b/PartCommanderContinued/PartCommander.cs index 2103105..38ad98f 100644 --- a/PartCommanderContinued/PartCommander.cs +++ b/PartCommanderContinued/PartCommander.cs @@ -329,11 +329,11 @@ public void OnGUI() modStyle = modStyleKSP; } } - + // Make sure we have something to show if (visibleUI && FlightGlobals.ActiveVessel != null && currentWindow != null && PCScenario.Instance != null && PCScenario.Instance.gameSettings.visibleWindow) { - GUI.skin = modStyle.skin; + GUI.skin = modStyle.skin; currentWindow.windowRect = ClickThruBlocker.GUILayoutWindow(currentWindow.windowId, currentWindow.windowRect, mainWindow, ""); // Set the default location/size for new windows to be the same as this one PCScenario.Instance.gameSettings.windowDefaultRect = currentWindow.windowRect; @@ -377,6 +377,10 @@ protected void OnDestroy() GameEvents.onGameSceneLoadRequested.Remove(onSceneChange); + GameEvents.onShowUI.Remove(showUI); + GameEvents.onHideUI.Remove(hideUI); + GameEvents.onVesselWasModified.Remove(triggerUpdateParts); + GameEvents.onVesselChange.Remove(triggerUpdateParts); } // ------------------------------------------ Application Launcher / UI --------------------------------------- @@ -760,7 +764,7 @@ private void getActiveParts() //foreach (PartModule pm in p.Modules) { PartModule pm = p.Modules[pmi]; - + if (includePart) { // Part was already included, so break out @@ -1030,7 +1034,7 @@ private int showEvents(Part p, bool symLock, string multiEngineMode) } return eventCount; } - + static Color btnNrml = new Color(34f / 255f, 199f / 255f, 222f / 255f, 1); static Texture2D BtnNrmlTex; @@ -1077,7 +1081,7 @@ private void showEvent(Part p, bool symLock, PartModule pm, BaseEvent e, string #endif if (GUILayout.Button("", /* bStyle, */ GUILayout.Width(50), GUILayout.Height(15))) - { + { if (symLock) { for (int i = 0; i < FlightGlobals.ActiveVessel.Parts.Count; i++)