]> git.donarmstrong.com Git - mothur.git/blobdiff - collect.cpp
pat's changes after generating wiki pages for 1.5
[mothur.git] / collect.cpp
index d109ca0540c01a78ca7e08c5c0e7bf6dfad85d90..2d1f6e38573d10288f4192c1208f19c919673821 100644 (file)
@@ -46,16 +46,15 @@ void Collect::getCurve(int increment = 1){
                 for(int i=0;i<displays.size();i++){
                         displays[i]->reset();
                 }
+                               
+                               delete lookup;
+                               delete rank;
+                               delete ccd;
         }
         catch(exception& e) {
-                cout << "Standard Error: " << e.what() << " has occurred in the Collect class Function getCurve. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
-                exit(1);
-        }
-        catch(...) {
-                cout << "An unknown error has occurred in the Collect class function getCurve. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
-                exit(1);
+                       errorOut(e, "Collect", "getCurve");
+                       exit(1);
         }
-
 }
 
 /***********************************************************************/
@@ -111,7 +110,9 @@ try {
        
                         //calculate at 0 and the given increment
                         if((i == 0) || (i+1) % increment == 0){
+
                                                                //how many comparisons to make i.e. for group a, b, c = ab, ac, bc.
+
                                 int n = 1;
                                 for (int k = 0; k < (lookup.size() - 1); k++) { // pass cdd each set of groups to commpare
                                         for (int l = n; l < lookup.size(); l++) {
@@ -149,16 +150,18 @@ try {
                 for(int i=0;i<displays.size();i++){
                         displays[i]->reset();
                 }
+                               
+                               //memory cleanup
+                               delete ccd;
+                               for (int i = 0; i < lookup.size(); i++) {
+                                       delete lookup[i];
+                               }
+
         }
         catch(exception& e) {
-                cout << "Standard Error: " << e.what() << " has occurred in the Collect class Function getSharedCurve. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
-                exit(1);
-        }
-        catch(...) {
-                cout << "An unknown error has occurred in the Collect class function getSharedCurve. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
-                exit(1);
+                errorOut(e, "Collect", "getSharedCurve");
+                               exit(1);
         }
-
 }
 
 /**************************************************************************************/
@@ -180,4 +183,4 @@ void Collect::getGroupComb() {
 
 }
 
-/**************************************************************************************/
\ No newline at end of file
+/**************************************************************************************/