aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/goto.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/goto.h')
-rw-r--r--src/goto.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/goto.h b/src/goto.h
index f2064d1..5d29e8b 100644
--- a/src/goto.h
+++ b/src/goto.h
@@ -77,6 +77,11 @@ class GotoTable : private RBTreeString {
public:
GotoTable(bool _undo = true) : must_undo(_undo) {}
+ ~GotoTable()
+ {
+ clear();
+ }
+
gint remove(const gchar *name);
gint find(const gchar *name);
@@ -91,7 +96,10 @@ public:
inline void
clear(void)
{
- RBTreeString::clear();
+ Label *cur;
+
+ while ((cur = (Label *)min()))
+ delete (Label *)RBTreeString::remove(cur);
}
inline gchar *