Changeset 2377
 Timestamp:
 Aug 26, 2018 3:27:55 PM (2 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

stable/2.9/Cbc/src/CbcSolver.cpp
r2360 r2377 1342 1342 int statistics_nprocessedrows = 0, statistics_nprocessedcols = 0; 1343 1343 std::string statistics_result; 1344 int * 1344 int *statistics_number_cuts = NULL; 1345 1345 const char ** statistics_name_generators = NULL; 1346 1346 int statistics_number_generators = 0; … … 7061 7061 7062 7062 numberGenerators = babModel_>numberCutGenerators(); 7063 if (statistics_number_cuts) 7064 delete[] statistics_number_cuts; 7063 7065 statistics_number_cuts = new int [numberGenerators];; 7064 7066 statistics_number_generators = numberGenerators; … … 7093 7095 << CoinMessageEol; 7094 7096 } 7097 7095 7098 #ifdef COIN_DEVELOP 7096 7099 printf("%d solutions found by heuristics\n", … … 9143 9146 statistics_nprocessedrows, statistics_nprocessedcols); 9144 9147 for (int i = 0; i < statistics_number_generators; i++) 9145 fprintf(fp, ",%d", statistics_number_cuts[i]);9148 fprintf(fp, ",%d", (statistics_number_cuts!=NULL) ? statistics_number_cuts[i] : 0 ); 9146 9149 fprintf(fp, ","); 9147 9150 for (int i = 1; i < argc; i++) { … … 9978 9981 } 9979 9982 #endif 9980 delete [] statistics_number_cuts; 9983 if (statistics_number_cuts != NULL) 9984 delete [] statistics_number_cuts; 9981 9985 delete [] statistics_name_generators; 9982 9986 // By now all memory should be freed
Note: See TracChangeset
for help on using the changeset viewer.