]> git.donarmstrong.com Git - mothur.git/blobdiff - readdistcommand.cpp
added the Calculators Thomas made in the fall. Added parameter and command error...
[mothur.git] / readdistcommand.cpp
index 6d38f4e4d55cde380570dd53aaa847f96600550f..d8c3db1c896b53c2f0d270a5c2d4df1ac9eed626 100644 (file)
@@ -21,7 +21,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 +70,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);