From f8990cc12e0a21702f9af0b017518fba0b279668 Mon Sep 17 00:00:00 2001 From: Brian Norris Date: Thu, 4 Oct 2012 14:59:44 -0700 Subject: [PATCH 1/1] nodestack: destroy Nodes properly in ~NodeStack() --- nodestack.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nodestack.cc b/nodestack.cc index 0be23af4..6b1d4ef9 100644 --- a/nodestack.cc +++ b/nodestack.cc @@ -372,6 +372,8 @@ NodeStack::NodeStack() : NodeStack::~NodeStack() { + for (unsigned int i = 0; i < node_list.size(); i++) + delete node_list[i]; } void NodeStack::print() -- 2.34.1