]> git.donarmstrong.com Git - mothur.git/blobdiff - readdistcommand.cpp
more calculator edits and added coverage and whittaker
[mothur.git] / readdistcommand.cpp
index 6d38f4e4d55cde380570dd53aaa847f96600550f..f19bf115d9e5f7d084b6007f1d738bcf0d33d494 100644 (file)
@@ -8,6 +8,8 @@
  */
 
 #include "readdistcommand.h"
+#include "readphylip.h"
+#include "readcolumn.h"
 
 ReadDistCommand::ReadDistCommand(){
        try {
@@ -21,7 +23,7 @@ ReadDistCommand::ReadDistCommand(){
                else if (format == "matrix") { 
                                groupMap = new GroupMap(globaldata->getGroupFile());
                                groupMap->readMap();
-                               if (globaldata->gGroupmap != NULL) { delete globaldata->gGroupmap;  }
+                               //if (globaldata->gGroupmap != NULL) { delete globaldata->gGroupmap;  }
                                globaldata->gGroupmap = groupMap;
                }
                
@@ -70,6 +72,8 @@ int ReadDistCommand::execute(){
                        ifstream in;
                        openInputFile(filename, in);
                        matrix = new FullMatrix(in); //reads the matrix file
+                       //memory leak prevention
+                       //if (globaldata->gMatrix != NULL) { delete globaldata->gMatrix;  }
                        globaldata->gMatrix = matrix; //save matrix for coverage commands
                }else {
                        read->read(nameMap);