]> git.donarmstrong.com Git - mothur.git/blobdiff - globaldata.cpp
changed raredisplay to use vectors instead of files
[mothur.git] / globaldata.cpp
index 0d728a128bd8fc43f0314c21894faf813533c7e2..155aad57e1a6bcce20cbce2e0c8d92c776ead103 100644 (file)
@@ -93,18 +93,30 @@ void GlobalData::newRead() {
                        
                        //free memory
                        if (gGroupmap != NULL) { delete gGroupmap; gGroupmap = NULL; }
+
                        if (gListVector != NULL) { delete gListVector; gListVector = NULL;}
+
                        if (gSparseMatrix != NULL) { delete gSparseMatrix; gSparseMatrix = NULL; }
+
                        if (ginput != NULL) { delete ginput; ginput = NULL;}
+
                        if (gorder != NULL) { delete gorder; gorder = NULL; }
+
                        if (glist != NULL) { delete glist; glist = NULL;}
+
                        if (gSharedList != NULL) { delete gSharedList; gSharedList = NULL; }
+
                        if (sabund != NULL) { delete sabund; sabund = NULL;}
+
                        if (rabund != NULL) { delete rabund; rabund = NULL; }
+
                        if (gMatrix != NULL) { delete gMatrix; gMatrix = NULL;}
+
                        if (gTreemap != NULL) { delete gTreemap; gTreemap = NULL; }
+
                        if (gSequenceDB != NULL) { delete gSequenceDB; gSequenceDB = NULL;}
 
+
                        gTree.clear();
                        Treenames.clear();
                        labels.clear(); lines.clear(); Groups.clear();
@@ -112,11 +124,7 @@ void GlobalData::newRead() {
                        runParse = true;
        }
        catch(exception& e) {
-               cout << "Standard Error: " << e.what() << " has occurred in the GlobalData class Function newRead. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
-               exit(1);
-       }
-       catch(...) {
-               cout << "An unknown error has occurred in the GlobalData class function newRead. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+               errorOut(e, "GlobalData", "newRead");
                exit(1);
        }
 }
@@ -141,11 +149,7 @@ GlobalData::~GlobalData() {
                if (gSequenceDB != NULL) { delete gSequenceDB; gSequenceDB = NULL;}
        }
        catch(exception& e) {
-               cout << "Standard Error: " << e.what() << " has occurred in the GlobalData class Function ~GlobalData. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
-               exit(1);
-       }
-       catch(...) {
-               cout << "An unknown error has occurred in the GlobalData class function ~GlobalData. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+               errorOut(e, "GlobalData", "~GlobalData");
                exit(1);
        }
 }