r4117 - in trunk: . tools
- From: stw svn gnome org
- To: svn-commits-list gnome org
- Subject: r4117 - in trunk: . tools
- Date: Sun, 3 Dec 2006 04:41:38 -0500 (EST)
Author: stw
Date: 2006-12-03 04:41:35 -0500 (Sun, 03 Dec 2006)
New Revision: 4117
Modified:
trunk/ChangeLog
trunk/tools/bsefcompare.cc
Log:
Sun Dec 3 10:34:13 2006 Stefan Westerfeld <stefan space twc de>
* tools/bsefextract.cc: Added code to free feature data properly. This
change also fixes compiler warnings on gcc < 4.2, because a virtual
destructor was added thet was missing before.
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2006-12-02 23:02:36 UTC (rev 4116)
+++ trunk/ChangeLog 2006-12-03 09:41:35 UTC (rev 4117)
@@ -1,3 +1,9 @@
+Sun Dec 3 10:34:13 2006 Stefan Westerfeld <stefan space twc de>
+
+ * tools/bsefextract.cc: Added code to free feature data properly. This
+ change also fixes compiler warnings on gcc < 4.2, because a virtual
+ destructor was added thet was missing before.
+
Mon Nov 27 22:40:46 2006 Stefan Westerfeld <stefan space twc de>
* tools/bsewavetool.cc: Move highpass handle from gsl to bse
Modified: trunk/tools/bsefcompare.cc
===================================================================
--- trunk/tools/bsefcompare.cc 2006-12-02 23:02:36 UTC (rev 4116)
+++ trunk/tools/bsefcompare.cc 2006-12-03 09:41:35 UTC (rev 4117)
@@ -341,6 +341,10 @@
FeatureValue (string name, Type type) : name (name), type (type)
{
}
+ virtual
+ ~FeatureValue()
+ {
+ }
virtual GTokenType parse (GScanner *scanner) = 0;
virtual string printable_type() const = 0;
/**
@@ -399,7 +403,9 @@
vector<FeatureValue*> feature_values;
GTokenType parseFeatureValue (GScanner *scanner);
- void parse (const string& filename);
+ void parse (const string& filename);
+
+ ~FeatureValueFile();
};
//------- FeatureValueNumber implementation --------
@@ -618,6 +624,12 @@
}
}
+FeatureValueFile::~FeatureValueFile()
+{
+ for (vector<FeatureValue *>::iterator fvi = feature_values.begin(); fvi != feature_values.end(); fvi++)
+ delete *fvi;
+}
+
int
main (int argc, char **argv)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]