]> git.donarmstrong.com Git - mothur.git/blobdiff - venncommand.cpp
fixed some bugs
[mothur.git] / venncommand.cpp
index 70c136b8cb56f59aeeef41cba2d1c1fa75e83b54..343461af0a697c72af7a00a3fc219a5a544e707c 100644 (file)
@@ -181,10 +181,13 @@ void VennCommand::help(){
 //**********************************************************************************************************************
 
 VennCommand::~VennCommand(){
-       delete input;
-       delete read;
-       delete venn;
-       for (int i = 0; i < vennCalculators.size(); i++) {      delete vennCalculators[i];      }
+       if (abort == false) {
+               delete input; globaldata->ginput = NULL;
+               delete read;
+               delete venn;
+               globaldata->sabund = NULL;
+       }
+       
 }
 
 //**********************************************************************************************************************
@@ -342,6 +345,7 @@ int VennCommand::execute(){
                        delete lastSAbund;
                }
                
+               for (int i = 0; i < vennCalculators.size(); i++) {      delete vennCalculators[i];      }
                return 0;
        }
        catch(exception& e) {