Changeset 826


Ignore:
Timestamp:
Oct 21, 2007 12:33:27 PM (12 years ago)
Author:
forrest
Message:

try and fix reported memory leak

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Cbc/src/CbcHeuristicFPump.cpp

    r776 r826  
    310310  double saveBestObjective = model_->getMinimizationObjValue();
    311311  int numberSolutions=0;
     312  OsiSolverInterface * solver = NULL;
    312313  while (!exitAll) {
    313314    int numberPasses=0;
    314315    numberTries++;
    315316    // Clone solver - otherwise annoys root node computations
    316     OsiSolverInterface * solver = model_->solver()->clone();
     317    solver = model_->solver()->clone();
    317318    if (CoinMin(fakeCutoff_,cutoff)<1.0e50) {
    318319      // Fix on djs
     
    935936    }
    936937    delete solver;
     938    solver=NULL;
    937939    for ( j=0;j<NUMBER_OLD;j++)
    938940      delete [] oldSolution[j];
     
    11271129    }
    11281130  }
     1131  delete solver; // probably NULL but do anyway
    11291132  if (!finalReturnCode&&closestSolution&&closestObjectiveValue <= 10.0&&usedColumn) {
    11301133    // try a bit of branch and bound
Note: See TracChangeset for help on using the changeset viewer.