#include "readdistcommand.h"
#include "readphylip.h"
#include "readcolumn.h"
+#include "readmatrix.hpp"
ReadDistCommand::ReadDistCommand(){
try {
globaldata->gMatrix = matrix; //save matrix for coverage commands
}else {
read->read(nameMap);
+ //to prevent memory leak
+ if (globaldata->gListVector != NULL) { delete globaldata->gListVector; }
globaldata->gListVector = read->getListVector();
+ if (globaldata->gSparseMatrix != NULL) { delete globaldata->gSparseMatrix; }
globaldata->gSparseMatrix = read->getMatrix();
}
return 0;