nodestack: destroy Nodes properly in ~NodeStack()
authorBrian Norris <banorris@uci.edu>
Thu, 4 Oct 2012 21:59:44 +0000 (14:59 -0700)
committerBrian Norris <banorris@uci.edu>
Thu, 4 Oct 2012 21:59:44 +0000 (14:59 -0700)
nodestack.cc

index 0be23af47643d269f207e80a474e03ea4ab84847..6b1d4ef9c86929fdd14d14172149abaacec96133 100644 (file)
@@ -372,6 +372,8 @@ NodeStack::NodeStack() :
 
 NodeStack::~NodeStack()
 {
 
 NodeStack::~NodeStack()
 {
+       for (unsigned int i = 0; i < node_list.size(); i++)
+               delete node_list[i];
 }
 
 void NodeStack::print()
 }
 
 void NodeStack::print()