]> 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 a9d772183d253168e96d48aa6d979c94616bde0d..d8c3db1c896b53c2f0d270a5c2d4df1ac9eed626 100644 (file)
@@ -21,6 +21,7 @@ ReadDistCommand::ReadDistCommand(){
                else if (format == "matrix") { 
                                groupMap = new GroupMap(globaldata->getGroupFile());
                                groupMap->readMap();
+                               //if (globaldata->gGroupmap != NULL) { delete globaldata->gGroupmap;  }
                                globaldata->gGroupmap = groupMap;
                }
                
@@ -69,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);