ide/settings: Memory leak fixes
authorJerome St-Louis <jerome@ecere.com>
Thu, 4 Aug 2016 17:26:09 +0000 (13:26 -0400)
committerJerome St-Louis <jerome@ecere.com>
Thu, 4 Aug 2016 17:28:59 +0000 (13:28 -0400)
documentor/locale/documentor.pot
epj2make/locale/epj2make.pot
ide/src/IDESettings.ec
installer/locale/Installer.pot

index e51e05a..7094758 100644 (file)
@@ -174,7 +174,7 @@ msgstr "Enumeration"
 msgid "Enumeration Values"
 msgstr "Enumeration Values"
 
-#: ./../ide/src/IDESettings.ec:1982
+#: ./../ide/src/IDESettings.ec:1998
 msgid "Error creating compiler configs directory at "
 msgstr "Error creating compiler configs directory at "
 
@@ -194,7 +194,7 @@ msgstr "File"
 msgid "Functions"
 msgstr "Functions"
 
-#: ./../ide/src/IDESettings.ec:1435
+#: ./../ide/src/IDESettings.ec:1451
 msgid "GNU Compiler Collection (GCC) / GNU Make"
 msgstr "GNU Compiler Collection (GCC) / GNU Make"
 
@@ -202,15 +202,15 @@ msgstr "GNU Compiler Collection (GCC) / GNU Make"
 msgid "Methods"
 msgstr "Methods"
 
-#: ./../ide/src/IDESettings.ec:1438
+#: ./../ide/src/IDESettings.ec:1454
 msgid "Microsoft Visual Studio 2005 (8.0) Compiler"
 msgstr "Microsoft Visual Studio 2005 (8.0) Compiler"
 
-#: ./../ide/src/IDESettings.ec:1439
+#: ./../ide/src/IDESettings.ec:1455
 msgid "Microsoft Visual Studio 2008 (9.0) Compiler"
 msgstr "Microsoft Visual Studio 2008 (9.0) Compiler"
 
-#: ./../ide/src/IDESettings.ec:1441
+#: ./../ide/src/IDESettings.ec:1457
 msgid "Microsoft Visual Studio 2010 (10.0) Compiler"
 msgstr "Microsoft Visual Studio 2010 (10.0) Compiler"
 
@@ -239,7 +239,7 @@ msgstr "Open..."
 msgid "Parent namespace: <a href=\"api://%p\" style=\"text-decoration: none;\">%s</a><br>\n"
 msgstr "Parent namespace: <a href=\"api://%p\" style=\"text-decoration: none;\">%s</a><br>\n"
 
-#: ./../ide/src/IDESettings.ec:1437
+#: ./../ide/src/IDESettings.ec:1453
 msgid "Portable C Compiler / GNU Make"
 msgstr "Portable C Compiler / GNU Make"
 
@@ -275,7 +275,7 @@ msgstr "Structure"
 msgid "Tahoma"
 msgstr "Tahoma"
 
-#: ./../ide/src/IDESettings.ec:1436
+#: ./../ide/src/IDESettings.ec:1452
 msgid "Tiny C Compiler / GNU Make"
 msgstr "Tiny C Compiler / GNU Make"
 
@@ -305,11 +305,11 @@ msgstr "eC Shared Library files (*.dll, *.so, *.dylib)"
 msgid "eC Symbol files (*.sym)"
 msgstr "eC Symbol files (*.sym)"
 
-#: ./../ide/src/IDESettings.ec:857
+#: ./../ide/src/IDESettings.ec:858
 msgid "error: could not parse configuration file: "
 msgstr "error: could not parse configuration file: "
 
-#: ./../ide/src/IDESettings.ec:831
+#: ./../ide/src/IDESettings.ec:832
 msgid "error: could not safely open file for writing configuration: "
 msgstr "error: could not safely open file for writing configuration: "
 
@@ -322,27 +322,27 @@ msgstr "this pointer class: <a href=\"api://%p\" style=\"text-decoration: none;\
 msgid "this pointer class: None<br>\n"
 msgstr "this pointer class: None<br>\n"
 
-#: ./../ide/src/IDESettings.ec:925
+#: ./../ide/src/IDESettings.ec:926
 msgid "warning: SafeFile::open: does not yet support FileOpenMode::"
 msgstr "warning: SafeFile::open: does not yet support FileOpenMode::"
 
-#: ./../ide/src/IDESettings.ec:912
+#: ./../ide/src/IDESettings.ec:913
 msgid "warning: SafeFile::open: unable to obtain exclusive lock on temporary file for writing: "
 msgstr "warning: SafeFile::open: unable to obtain exclusive lock on temporary file for writing: "
 
-#: ./../ide/src/IDESettings.ec:914
+#: ./../ide/src/IDESettings.ec:915
 msgid "warning: SafeFile::open: unable to obtain shared lock on file for reading: "
 msgstr "warning: SafeFile::open: unable to obtain shared lock on file for reading: "
 
-#: ./../ide/src/IDESettings.ec:919
+#: ./../ide/src/IDESettings.ec:920
 msgid "warning: SafeFile::open: unable to open file for reading: "
 msgstr "warning: SafeFile::open: unable to open file for reading: "
 
-#: ./../ide/src/IDESettings.ec:917
+#: ./../ide/src/IDESettings.ec:918
 msgid "warning: SafeFile::open: unable to open temporary file for writing: "
 msgstr "warning: SafeFile::open: unable to open temporary file for writing: "
 
-#: ./../ide/src/IDESettings.ec:967
+#: ./../ide/src/IDESettings.ec:968
 msgid "warning: SafeFile::sync: failed to lock file for "
 msgstr "warning: SafeFile::sync: failed to lock file for "
 
index ab75a53..4fb97be 100644 (file)
@@ -90,7 +90,7 @@ msgstr " to compile instead of "
 msgid "Compiling source file "
 msgstr "Compiling source file "
 
-#: ./../ide/src/IDESettings.ec:1982
+#: ./../ide/src/IDESettings.ec:1998
 msgid "Error creating compiler configs directory at "
 msgstr "Error creating compiler configs directory at "
 
@@ -106,19 +106,19 @@ msgstr "Error: Project configuration (%s) was not found.\n"
 msgid "Error: Unable to open project file (%s) due to unknown error.\n"
 msgstr "Error: Unable to open project file (%s) due to unknown error.\n"
 
-#: ./../ide/src/IDESettings.ec:1435
+#: ./../ide/src/IDESettings.ec:1451
 msgid "GNU Compiler Collection (GCC) / GNU Make"
 msgstr "GNU Compiler Collection (GCC) / GNU Make"
 
-#: ./../ide/src/IDESettings.ec:1438
+#: ./../ide/src/IDESettings.ec:1454
 msgid "Microsoft Visual Studio 2005 (8.0) Compiler"
 msgstr "Microsoft Visual Studio 2005 (8.0) Compiler"
 
-#: ./../ide/src/IDESettings.ec:1439
+#: ./../ide/src/IDESettings.ec:1455
 msgid "Microsoft Visual Studio 2008 (9.0) Compiler"
 msgstr "Microsoft Visual Studio 2008 (9.0) Compiler"
 
-#: ./../ide/src/IDESettings.ec:1441
+#: ./../ide/src/IDESettings.ec:1457
 msgid "Microsoft Visual Studio 2010 (10.0) Compiler"
 msgstr "Microsoft Visual Studio 2010 (10.0) Compiler"
 
@@ -130,7 +130,7 @@ msgstr "No compilation required for header file "
 msgid "Notice: Project configuration (%s) will be used.\n"
 msgstr "Notice: Project configuration (%s) will be used.\n"
 
-#: ./../ide/src/IDESettings.ec:1437
+#: ./../ide/src/IDESettings.ec:1453
 msgid "Portable C Compiler / GNU Make"
 msgstr "Portable C Compiler / GNU Make"
 
@@ -138,7 +138,7 @@ msgstr "Portable C Compiler / GNU Make"
 msgid "Syntax:\n"
 msgstr "Syntax:\n"
 
-#: ./../ide/src/IDESettings.ec:1436
+#: ./../ide/src/IDESettings.ec:1452
 msgid "Tiny C Compiler / GNU Make"
 msgstr "Tiny C Compiler / GNU Make"
 
@@ -150,11 +150,11 @@ msgstr "Unable to locate source file "
 msgid "\n"
 msgstr "\n"
 
-#: ./../ide/src/IDESettings.ec:857
+#: ./../ide/src/IDESettings.ec:858
 msgid "error: could not parse configuration file: "
 msgstr "error: could not parse configuration file: "
 
-#: ./../ide/src/IDESettings.ec:831
+#: ./../ide/src/IDESettings.ec:832
 msgid "error: could not safely open file for writing configuration: "
 msgstr "error: could not safely open file for writing configuration: "
 
@@ -162,27 +162,27 @@ msgstr "error: could not safely open file for writing configuration: "
 msgid "invalid option: %s\n"
 msgstr "invalid option: %s\n"
 
-#: ./../ide/src/IDESettings.ec:925
+#: ./../ide/src/IDESettings.ec:926
 msgid "warning: SafeFile::open: does not yet support FileOpenMode::"
 msgstr "warning: SafeFile::open: does not yet support FileOpenMode::"
 
-#: ./../ide/src/IDESettings.ec:912
+#: ./../ide/src/IDESettings.ec:913
 msgid "warning: SafeFile::open: unable to obtain exclusive lock on temporary file for writing: "
 msgstr "warning: SafeFile::open: unable to obtain exclusive lock on temporary file for writing: "
 
-#: ./../ide/src/IDESettings.ec:914
+#: ./../ide/src/IDESettings.ec:915
 msgid "warning: SafeFile::open: unable to obtain shared lock on file for reading: "
 msgstr "warning: SafeFile::open: unable to obtain shared lock on file for reading: "
 
-#: ./../ide/src/IDESettings.ec:919
+#: ./../ide/src/IDESettings.ec:920
 msgid "warning: SafeFile::open: unable to open file for reading: "
 msgstr "warning: SafeFile::open: unable to open file for reading: "
 
-#: ./../ide/src/IDESettings.ec:917
+#: ./../ide/src/IDESettings.ec:918
 msgid "warning: SafeFile::open: unable to open temporary file for writing: "
 msgstr "warning: SafeFile::open: unable to open temporary file for writing: "
 
-#: ./../ide/src/IDESettings.ec:967
+#: ./../ide/src/IDESettings.ec:968
 msgid "warning: SafeFile::sync: failed to lock file for "
 msgstr "warning: SafeFile::sync: failed to lock file for "
 
index b0feab9..0028ce5 100644 (file)
@@ -986,12 +986,24 @@ class RecentFilesData
 {
 public:
    RecentFiles recentFiles;
+
+   ~RecentFilesData()
+   {
+      if(recentFiles) recentFiles.Free();
+      delete recentFiles;
+   }
 }
 
 class RecentWorkspacesData
 {
 public:
    RecentWorkspaces recentWorkspaces;
+
+   ~RecentWorkspacesData()
+   {
+      if(recentWorkspaces) recentWorkspaces.Free();
+      delete recentWorkspaces;
+   }
 }
 
 class IDESettings : GlobalSettingsData
@@ -1319,6 +1331,7 @@ class RecentFiles : RecentPaths
       {
          Free();
          Copy((void *)d.recentFiles);
+         d.recentFiles.RemoveAll();
          settingsContainer.recentFiles = this; // Merge IDEConfigHolder / IDESettingsContainer?
       }
       delete d;
@@ -1353,6 +1366,7 @@ class RecentWorkspaces : RecentPaths
       {
          Free();
          Copy((void *)d.recentWorkspaces);
+         d.recentWorkspaces.RemoveAll();
          settingsContainer.recentProjects = this; // Merge IDEConfigHolder / IDESettingsContainer?
       }
       delete d;
index 0bb6212..b73b03a 100644 (file)
@@ -197,7 +197,7 @@ msgstr "Ecere Software Development Kit Setup - v0.44.15 \"Ryōan-ji\" Web Editio
 msgid "Ecere Vanilla"
 msgstr "Ecere Vanilla"
 
-#: ./../ide/src/IDESettings.ec:1982
+#: ./../ide/src/IDESettings.ec:1998
 msgid "Error creating compiler configs directory at "
 msgstr "Error creating compiler configs directory at "
 
@@ -221,7 +221,7 @@ msgstr "GDB Docs"
 msgid "GNU C Compiler"
 msgstr "GNU C Compiler"
 
-#: ./../ide/src/IDESettings.ec:1435
+#: ./../ide/src/IDESettings.ec:1451
 msgid "GNU Compiler Collection (GCC) / GNU Make"
 msgstr "GNU Compiler Collection (GCC) / GNU Make"
 
@@ -307,15 +307,15 @@ msgstr "License Agreements"
 msgid "Make Docs"
 msgstr "Make Docs"
 
-#: ./../ide/src/IDESettings.ec:1438
+#: ./../ide/src/IDESettings.ec:1454
 msgid "Microsoft Visual Studio 2005 (8.0) Compiler"
 msgstr "Microsoft Visual Studio 2005 (8.0) Compiler"
 
-#: ./../ide/src/IDESettings.ec:1439
+#: ./../ide/src/IDESettings.ec:1455
 msgid "Microsoft Visual Studio 2008 (9.0) Compiler"
 msgstr "Microsoft Visual Studio 2008 (9.0) Compiler"
 
-#: ./../ide/src/IDESettings.ec:1441
+#: ./../ide/src/IDESettings.ec:1457
 msgid "Microsoft Visual Studio 2010 (10.0) Compiler"
 msgstr "Microsoft Visual Studio 2010 (10.0) Compiler"
 
@@ -335,7 +335,7 @@ msgstr "Networking"
 msgid "Please wait while the Ecere Software Development Kit is being installed."
 msgstr "Please wait while the Ecere Software Development Kit is being installed."
 
-#: ./../ide/src/IDESettings.ec:1437
+#: ./../ide/src/IDESettings.ec:1453
 msgid "Portable C Compiler / GNU Make"
 msgstr "Portable C Compiler / GNU Make"
 
@@ -404,7 +404,7 @@ msgstr "This program is based on these free open source software components."
 msgid "Threading"
 msgstr "Threading"
 
-#: ./../ide/src/IDESettings.ec:1436
+#: ./../ide/src/IDESettings.ec:1452
 msgid "Tiny C Compiler / GNU Make"
 msgstr "Tiny C Compiler / GNU Make"
 
@@ -425,11 +425,11 @@ msgstr "built on "
 msgid "eC Compiler"
 msgstr "eC Compiler"
 
-#: ./../ide/src/IDESettings.ec:857
+#: ./../ide/src/IDESettings.ec:858
 msgid "error: could not parse configuration file: "
 msgstr "error: could not parse configuration file: "
 
-#: ./../ide/src/IDESettings.ec:831
+#: ./../ide/src/IDESettings.ec:832
 msgid "error: could not safely open file for writing configuration: "
 msgstr "error: could not safely open file for writing configuration: "
 
@@ -441,27 +441,27 @@ msgstr "gnurx Docs"
 msgid "terms and conditions"
 msgstr "terms and conditions"
 
-#: ./../ide/src/IDESettings.ec:925
+#: ./../ide/src/IDESettings.ec:926
 msgid "warning: SafeFile::open: does not yet support FileOpenMode::"
 msgstr "warning: SafeFile::open: does not yet support FileOpenMode::"
 
-#: ./../ide/src/IDESettings.ec:912
+#: ./../ide/src/IDESettings.ec:913
 msgid "warning: SafeFile::open: unable to obtain exclusive lock on temporary file for writing: "
 msgstr "warning: SafeFile::open: unable to obtain exclusive lock on temporary file for writing: "
 
-#: ./../ide/src/IDESettings.ec:914
+#: ./../ide/src/IDESettings.ec:915
 msgid "warning: SafeFile::open: unable to obtain shared lock on file for reading: "
 msgstr "warning: SafeFile::open: unable to obtain shared lock on file for reading: "
 
-#: ./../ide/src/IDESettings.ec:919
+#: ./../ide/src/IDESettings.ec:920
 msgid "warning: SafeFile::open: unable to open file for reading: "
 msgstr "warning: SafeFile::open: unable to open file for reading: "
 
-#: ./../ide/src/IDESettings.ec:917
+#: ./../ide/src/IDESettings.ec:918
 msgid "warning: SafeFile::open: unable to open temporary file for writing: "
 msgstr "warning: SafeFile::open: unable to open temporary file for writing: "
 
-#: ./../ide/src/IDESettings.ec:967
+#: ./../ide/src/IDESettings.ec:968
 msgid "warning: SafeFile::sync: failed to lock file for "
 msgstr "warning: SafeFile::sync: failed to lock file for "