You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by nw...@apache.org on 2013/05/27 16:53:28 UTC
[lucy-commits] git commit: refs/heads/master - Free all memory before exiting cfc
and test_cfc
Updated Branches:
refs/heads/master 0c8642094 -> 14646309e
Free all memory before exiting cfc and test_cfc
Now valgrind reports that all heap blocks were freed.
Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/14646309
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/14646309
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/14646309
Branch: refs/heads/master
Commit: 14646309e314d64e69b4f9c4ed7bda1dd7a50fb1
Parents: 0c86420
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Mon May 27 16:50:00 2013 +0200
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Mon May 27 16:52:13 2013 +0200
----------------------------------------------------------------------
clownfish/compiler/c/cfc.c | 7 +++++++
clownfish/compiler/c/t/test_cfc.c | 2 ++
2 files changed, 9 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucy/blob/14646309/clownfish/compiler/c/cfc.c
----------------------------------------------------------------------
diff --git a/clownfish/compiler/c/cfc.c b/clownfish/compiler/c/cfc.c
index 9185e33..a3a5123 100644
--- a/clownfish/compiler/c/cfc.c
+++ b/clownfish/compiler/c/cfc.c
@@ -17,7 +17,10 @@
#include "CFCBase.h"
#include "CFCBindCore.h"
#include "CFCC.h"
+#include "CFCClass.h"
+#include "CFCLexHeader.h"
#include "CFCHierarchy.h"
+#include "CFCParcel.h"
#include "CFCUtil.h"
#include <stdio.h>
@@ -197,6 +200,10 @@ main(int argc, char **argv) {
FREEMEM(header);
FREEMEM(footer);
+ CFCClass_clear_registry();
+ CFCParcel_reap_singletons();
+ yylex_destroy();
+
S_free_arguments(&args);
return EXIT_SUCCESS;
http://git-wip-us.apache.org/repos/asf/lucy/blob/14646309/clownfish/compiler/c/t/test_cfc.c
----------------------------------------------------------------------
diff --git a/clownfish/compiler/c/t/test_cfc.c b/clownfish/compiler/c/t/test_cfc.c
index 66fa90a..f8da717 100644
--- a/clownfish/compiler/c/t/test_cfc.c
+++ b/clownfish/compiler/c/t/test_cfc.c
@@ -17,6 +17,7 @@
#include <stdlib.h>
#include "CFCBase.h"
+#include "CFCLexHeader.h"
#include "CFCTest.h"
int
@@ -25,6 +26,7 @@ main() {
CFCTest_run_all(test);
int pass = CFCTest_finish(test);
CFCBase_decref((CFCBase*)test);
+ yylex_destroy();
return pass ? EXIT_SUCCESS : EXIT_FAILURE;
}