diff src/symtab.cc @ 5013:1eb9ce5c0152

[project @ 2004-09-21 22:18:07 by jwe]
author jwe
date Tue, 21 Sep 2004 22:22:13 +0000
parents 2bcd013bc867
children bdbee5282954
line wrap: on
line diff
--- a/src/symtab.cc
+++ b/src/symtab.cc
@@ -700,6 +700,25 @@
 
 // A symbol table.
 
+symbol_table::~symbol_table (void)
+{
+  for (unsigned int i = 0; i < table_size; i++)
+    {
+      symbol_record *ptr = table[i].next ();
+
+      while (ptr)
+	{
+	  symbol_record *tmp = ptr;
+
+	  ptr = ptr->next ();
+
+	  delete tmp;
+	}
+    }
+
+  delete [] table;
+}
+
 symbol_record *
 symbol_table::lookup (const std::string& nm, bool insert, bool warn)
 {