[anjuta/cxxparser] cxxparser: added destructor



commit 65d832f54c13d235b8ef93145e93a0119c439593
Author: Massimo Corà <mcora src gnome org>
Date:   Sat Nov 14 14:54:51 2009 +0100

    cxxparser: added destructor

 plugins/symbol-db/cxxparser/engine-parser-priv.h |    2 ++
 plugins/symbol-db/cxxparser/engine-parser.cpp    |    6 ++++++
 plugins/symbol-db/cxxparser/main.c               |    8 ++++----
 3 files changed, 12 insertions(+), 4 deletions(-)
---
diff --git a/plugins/symbol-db/cxxparser/engine-parser-priv.h b/plugins/symbol-db/cxxparser/engine-parser-priv.h
index dff2b4a..c56ba59 100644
--- a/plugins/symbol-db/cxxparser/engine-parser-priv.h
+++ b/plugins/symbol-db/cxxparser/engine-parser-priv.h
@@ -80,6 +80,8 @@ protected:
 
 	EngineParser ();
 
+	virtual ~EngineParser ();
+
 	/**
 	 * Parse an expression and return the result. 
 	 * @param in Input string expression
diff --git a/plugins/symbol-db/cxxparser/engine-parser.cpp b/plugins/symbol-db/cxxparser/engine-parser.cpp
index 71b6bc1..abbfe95 100644
--- a/plugins/symbol-db/cxxparser/engine-parser.cpp
+++ b/plugins/symbol-db/cxxparser/engine-parser.cpp
@@ -50,6 +50,12 @@ EngineParser::EngineParser ()
 	_dbe = NULL;
 }
 
+EngineParser::~EngineParser ()
+{
+	delete _main_tokenizer;
+	delete _extra_tokenizer;
+}
+
 bool 
 EngineParser::nextMainToken (string &out_token, string &out_delimiter)
 {
diff --git a/plugins/symbol-db/cxxparser/main.c b/plugins/symbol-db/cxxparser/main.c
index 8b8a3d3..0e901d7 100644
--- a/plugins/symbol-db/cxxparser/main.c
+++ b/plugins/symbol-db/cxxparser/main.c
@@ -356,17 +356,17 @@ int	main (int argc, char *argv[])
 
 	g_message ("SAMPLE_DB_ABS_PATH %s", SAMPLE_DB_ABS_PATH);
  	g_test_init (&argc, &argv, NULL);
-
-/*	g_test_add_func ("/simple_c/test-simple-struct", test_simple_struct);
+/*
+	g_test_add_func ("/simple_c/test-simple-struct", test_simple_struct);
 	g_test_add_func ("/simple_c/test-cast-simple-struct", test_cast_simple_struct);
 	
 	g_test_add_func ("/complex_c/test-complex-struct", test_complex_struct);
 	*/
 	g_test_add_func ("/complex_c/test-complex-struct2", test_complex_struct2);
-/*	
+	/*
 	g_test_add_func ("/simple_cxx/test_simple_klass", test_simple_klass);
 	g_test_add_func ("/complex_cxx/test_complex_klass", test_complex_klass);
-*/	
+	*/
 	
 	g_test_run ();
 	g_message ("test run finished");



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]