]> git.donarmstrong.com Git - mothur.git/blobdiff - raredisplay.cpp
fixed memory leak in collect.shared()
[mothur.git] / raredisplay.cpp
index 812626604483ca0ab0d5978e2ea8c9542d394fc6..3d50b2612f9c9cc8df9de5b48e5e55e260806fc6 100644 (file)
@@ -15,6 +15,7 @@ void RareDisplay::init(string label){
        try {
                this->label = label;
                if(nIters != 1){
+                       tempInFile.clear();
                        openOutputFile(tempOutName, tempOutFile);
                        openInputFile(tempInName, tempInFile);
                }
@@ -68,9 +69,9 @@ void RareDisplay::update(SAbundVector* rank){
 };
 
 /***********************************************************************/
-void RareDisplay::update(SharedRAbundVector* shared1, SharedRAbundVector* shared2, int numSeqs, int numGroupComb) {
+void RareDisplay::update(vector<SharedRAbundVector*> shared, int numSeqs, int numGroupComb) {
        try {
-               vector<double> data = estimate->getValues(shared1, shared2); 
+               vector<double> data = estimate->getValues(shared); 
                double newNSeqs = data[0];
                
                if(nIters != 1){