X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=readdistcommand.cpp;h=f19bf115d9e5f7d084b6007f1d738bcf0d33d494;hb=477e76a8a79b60f6cd4253324dd830bdea25e3e9;hp=6d38f4e4d55cde380570dd53aaa847f96600550f;hpb=cd10743907df223b7dd5b3a3deb20fde758b8ed7;p=mothur.git diff --git a/readdistcommand.cpp b/readdistcommand.cpp index 6d38f4e..f19bf11 100644 --- a/readdistcommand.cpp +++ b/readdistcommand.cpp @@ -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);