+ }else if (format == "sharedfile") {
+ while (in.eof() != true) {
+
+ SharedRAbundVector* SharedRAbund = new SharedRAbundVector(in);
+ if (SharedRAbund != NULL) {
+ thisLabel = SharedRAbund->getLabel();
+
+ //if you are at the last label
+ if (thisLabel == label) {
+ in.close();
+ vector<SharedRAbundVector*> lookup = SharedRAbund->getSharedRAbundVectors();
+ vector<SharedRAbundFloatVector*> lookupFloat = SharedRAbund->getSharedRAbundFloatVectors(lookup);
+ for (int i = 0; i < lookup.size(); i++) { delete lookup[i]; } lookup.clear();
+ return lookupFloat;
+ }else {
+ //so you don't loose this memory
+ vector<SharedRAbundVector*> lookup = SharedRAbund->getSharedRAbundVectors();
+ for (int i = 0; i < lookup.size(); i++) { delete lookup[i]; } lookup.clear();
+ delete SharedRAbund;
+ }
+ }else{ break; }
+ m->gobble(in);
+ }
+ }