]> git.donarmstrong.com Git - mothur.git/blobdiff - readtreecommand.cpp
documentation
[mothur.git] / readtreecommand.cpp
index 405de84daef015d5edb37110ab35f0a2c98bbbb3..8124d53415bda6035a3f6686d8ebc50a3ecb1419 100644 (file)
@@ -18,6 +18,9 @@ ReadTreeCommand::ReadTreeCommand(){
                //read in group map info.
                treeMap = new TreeMap(globaldata->getGroupFile());
                treeMap->readMap();
+               
+               //memory leak prevention
+               if (globaldata->gTreemap != NULL) { delete globaldata->gTreemap;  }
                globaldata->gTreemap = treeMap;
 
                read = new ReadNewickTree(filename);