diff options
author | Alex Merry <dev@randomguy3.me.uk> | 2013-03-25 18:15:11 +0000 |
---|---|---|
committer | Alex Merry <dev@randomguy3.me.uk> | 2013-03-25 18:36:52 +0000 |
commit | 0f969b6ced7e9ebcbe4bc4e17867ff32d67f27bb (patch) | |
tree | 9632ffa948332d8636c15537cb19356781a215ec /tikzit/src/gtk/Configuration.m | |
parent | 1b83e14b1f5640881deeb03c1d11df5197746b64 (diff) |
Catch some memory leaks
Memory usage on Linux no longer shoots up after running the tikz parser
a handful of times.
Diffstat (limited to 'tikzit/src/gtk/Configuration.m')
-rw-r--r-- | tikzit/src/gtk/Configuration.m | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tikzit/src/gtk/Configuration.m b/tikzit/src/gtk/Configuration.m index 6ac08e8..4a3ed79 100644 --- a/tikzit/src/gtk/Configuration.m +++ b/tikzit/src/gtk/Configuration.m @@ -272,6 +272,7 @@ for (int i = 0; i < length; ++i) { [result addObject:[NSString stringWithUTF8String:list[i]]]; } + g_strfreev (list); return result; } else { return def; @@ -292,6 +293,7 @@ for (int i = 0; i < length; ++i) { [result addObject:[NSNumber numberWithBool:list[i]]]; } + g_free (list); return result; } else { return def; @@ -312,6 +314,7 @@ for (int i = 0; i < length; ++i) { [result addObject:[NSNumber numberWithInt:list[i]]]; } + g_free (list); return result; } else { return def; @@ -332,6 +335,7 @@ for (int i = 0; i < length; ++i) { [result addObject:[NSNumber numberWithDouble:list[i]]]; } + g_free (list); return result; } else { return def; |