]> git.donarmstrong.com Git - mothur.git/blobdiff - parsimonycommand.cpp
added the Calculators Thomas made in the fall. Added parameter and command error...
[mothur.git] / parsimonycommand.cpp
index e7d64e5201a5f1e29c3fce9c85d0622793138837..493af9b867e5542ee4c4c93acfa6c40a9c95fc5a 100644 (file)
@@ -166,7 +166,11 @@ int ParsimonyCommand::execute() {
                if (randomtree == "") { printUSummaryFile(); }
                
                //reset globaldata's treemap if you just did random distrib
-               if (randomtree != "") { globaldata->gTreemap = savetmap; }
+               if (randomtree != "") {
+                       //memory leak prevention
+                       //if (globaldata->gTreemap != NULL) { delete globaldata->gTreemap;  }
+                       globaldata->gTreemap = savetmap;
+               }
                
                //reset randomTree parameter to ""
                globaldata->setRandomTree("");
@@ -293,6 +297,8 @@ void ParsimonyCommand::getUserInput() {
                getline(cin, s);
                
                //save tmap for later
+               //memory leak prevention
+               //if (globaldata->gTreemap != NULL) { delete globaldata->gTreemap;  }
                globaldata->gTreemap = tmap;
                
        }