 Timestamp:
 Aug 26, 2018 4:51:50 PM (2 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/Cbc/src/CbcSolver.cpp
r2372 r2378 7440 7440 numberGenerators = babModel_>numberCutGenerators(); 7441 7441 // can get here twice! 7442 delete [] statistics_number_cuts; 7443 delete [] statistics_name_generators; 7444 statistics_number_cuts = new int [numberGenerators];; 7442 if (statistics_number_cuts!=NULL) 7443 delete [] statistics_number_cuts; 7444 statistics_number_cuts = new int [numberGenerators]; 7445 7446 if (statistics_name_generators!=NULL) 7447 delete [] statistics_name_generators; 7448 statistics_name_generators = new const char *[numberGenerators]; 7449 7445 7450 statistics_number_generators = numberGenerators; 7446 statistics_name_generators = new const char *[numberGenerators]; 7451 7447 7452 char timing[30]; 7448 7453 for (iGenerator = 0; iGenerator < numberGenerators; iGenerator++) { … … 9634 9639 statistics_nprocessedrows, statistics_nprocessedcols); 9635 9640 for (int i = 0; i < statistics_number_generators; i++) 9636 fprintf(fp, ",%d", statistics_number_cuts[i] );9641 fprintf(fp, ",%d", statistics_number_cuts[i]!=NULL ? statistics_number_cuts[i] : 0); 9637 9642 fprintf(fp, ","); 9638 9643 for (int i = 1; i < argc; i++) { … … 10470 10475 #endif 10471 10476 delete [] lotsize; 10472 delete [] statistics_number_cuts; 10473 delete [] statistics_name_generators; 10477 if (statistics_number_cuts!=NULL) 10478 delete [] statistics_number_cuts; 10479 10480 if (statistics_name_generators!=NULL) 10481 delete [] statistics_name_generators; 10474 10482 // By now all memory should be freed 10475 10483 #ifdef DMALLOC
Note: See TracChangeset
for help on using the changeset viewer.