Deleting allocated NodeVecs in ITESimplifier.
authorTim King <taking@google.com>
Thu, 24 Mar 2016 21:58:13 +0000 (14:58 -0700)
committerTim King <taking@google.com>
Thu, 24 Mar 2016 21:58:13 +0000 (14:58 -0700)
src/theory/ite_utilities.cpp

index 2791a9555f764d7e15c166371f0d3a9db650d4ce..e5c56a2a451c3d3973f34793de3f80043e68baed 100644 (file)
@@ -657,6 +657,7 @@ ITESimplifier::NodeVec* ITESimplifier::computeConstantLeaves(TNode ite){
   // special case 2 constant children
   if(thenB.isConst() && elseB.isConst()){
     NodeVec* pair = new NodeVec(2);
+    d_allocatedConstantLeaves.push_back(pair);
     (*pair)[0] = std::min(thenB, elseB);
     (*pair)[1] = std::max(thenB, elseB);
     d_constantLeaves[ite] = pair;
@@ -694,6 +695,7 @@ ITESimplifier::NodeVec* ITESimplifier::computeConstantLeaves(TNode ite){
   }
 
   NodeVec* both = new NodeVec(defChildren->size()+maybeChildren->size());
+  d_allocatedConstantLeaves.push_back(both);
   NodeVec::iterator newEnd;
   newEnd = std::set_union(defChildren->begin(), defChildren->end(),
                           maybeChildren->begin(), maybeChildren->end(),