]> ruin.nu Git - popboot.git/blobdiff - planner.cpp
Might be good to have a destructor too
[popboot.git] / planner.cpp
index cf7801520883ac9e94cf62b958884fc8d95f369b..6d70ae40df2114d32e6cf4f3ab611155e96b6aa6 100644 (file)
@@ -20,6 +20,13 @@ Planner::Planner(std::vector<Action> actions, literals init, literals goal){
        makePlan(finish);
 }
 
+Planner::~Planner(){
+       for (hash_map<string,Node*>::iterator node = _addedNodes.begin(); node != _addedNodes.end(); ++node){
+               cerr << "Deleting node " << node->second->action().executable() << endl;
+               delete node->second;
+       }
+}
+
 
 void Planner::makePlan(Node* node){
        cerr << "Fetching preconditions for action: " << node->action().executable() << ".. ";