Changeset 879 for js/sdk/js_interface/js_types.h
- Timestamp:
- 05/23/19 22:45:38 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
js/sdk/js_interface/js_types.h
r865 r879 172 172 int _met = 0; 173 173 174 if (lastMutate == nullptr) delete[] lastMutate;174 if (lastMutate != nullptr) free(lastMutate); 175 175 lastMutate = strdup(geno); 176 176 return genoOper->mutate(lastMutate, _ch, _met); … … 187 187 float _ch2 = 0; 188 188 189 if (lastCross1 == nullptr) delete[] lastCross1;189 if (lastCross1 != nullptr) free(lastCross1); 190 190 lastCross1 = strdup(geno1); 191 191 192 if (lastCross2 == nullptr) delete[] lastCross2;192 if (lastCross2 != nullptr) free(lastCross2); 193 193 lastCross2 = strdup(geno2); 194 194 return genoOper->crossOver(lastCross1, lastCross2, _ch1, _ch2); … … 207 207 ~GenoOperatorsHelper() 208 208 { 209 if (lastMutate == nullptr) delete[] lastMutate;210 if (lastCross1 == nullptr) delete[] lastCross1;211 if (lastCross2 == nullptr) delete[] lastCross2;209 if (lastMutate != nullptr) free(lastMutate); 210 if (lastCross1 != nullptr) free(lastCross1); 211 if (lastCross2 != nullptr) free(lastCross2); 212 212 //delete genoOper; 213 213 }
Note: See TracChangeset
for help on using the changeset viewer.