aboutsummaryrefslogtreecommitdiffstats
path: root/e-util
diff options
context:
space:
mode:
authorNotZed <NotZed@HelixCode.com>2000-05-12 02:39:11 +0800
committerMichael Zucci <zucchi@src.gnome.org>2000-05-12 02:39:11 +0800
commit62c8174bac8139b29a71ea79c879c4cbdd6cd064 (patch)
treedbbbfe72cbd5b4dc4eb14a5683020a949903f133 /e-util
parentd509f47a95ddc37b4ee566eb5980c27f6626c8dc (diff)
downloadgsoc2013-evolution-62c8174bac8139b29a71ea79c879c4cbdd6cd064.tar.gz
gsoc2013-evolution-62c8174bac8139b29a71ea79c879c4cbdd6cd064.tar.zst
gsoc2013-evolution-62c8174bac8139b29a71ea79c879c4cbdd6cd064.zip
Destroy the g_scanner when cleaning up. (e_sexp_finalise): Free symbol
2000-05-11 NotZed <NotZed@HelixCode.com> * e-sexp.c (e_sexp_finalise): Destroy the g_scanner when cleaning up. (e_sexp_finalise): Free symbol table on finalise. svn path=/trunk/; revision=2988
Diffstat (limited to 'e-util')
-rw-r--r--e-util/ChangeLog5
-rw-r--r--e-util/e-sexp.c12
2 files changed, 17 insertions, 0 deletions
diff --git a/e-util/ChangeLog b/e-util/ChangeLog
index a4d3beeaae..367885919f 100644
--- a/e-util/ChangeLog
+++ b/e-util/ChangeLog
@@ -1,3 +1,8 @@
+2000-05-11 NotZed <NotZed@HelixCode.com>
+
+ * e-sexp.c (e_sexp_finalise): Destroy the g_scanner when cleaning up.
+ (e_sexp_finalise): Free symbol table on finalise.
+
2000-05-09 Christopher James Lahey <clahey@helixcode.com>
* e-canvas.c: Remove reflow idle when being destroyed.
diff --git a/e-util/e-sexp.c b/e-util/e-sexp.c
index 0f9abc636a..7d7b5f5f0f 100644
--- a/e-util/e-sexp.c
+++ b/e-util/e-sexp.c
@@ -903,6 +903,15 @@ static struct {
};
static void
+free_symbol(void *key, void *value, void *data)
+{
+ struct _ESExpSymbol *s = value;
+
+ g_free(s->name);
+ g_free(s);
+}
+
+static void
e_sexp_finalise(GtkObject *o)
{
ESExp *s = (ESExp *)o;
@@ -912,6 +921,9 @@ e_sexp_finalise(GtkObject *o)
s->tree = NULL;
}
+ g_scanner_scope_foreach_symbol(s->scanner, 0, free_symbol, 0);
+ g_scanner_destroy(s->scanner);
+
((GtkObjectClass *)(parent_class))->finalize((GtkObject *)o);
}