Changeset 1484


Ignore:
Timestamp:
Dec 30, 2009 12:23:30 PM (10 years ago)
Author:
forrest
Message:

memory leak

Location:
trunk/Clp/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Clp/src/ClpModel.cpp

    r1451 r1484  
    777777      savedColumnScale_ = NULL;
    778778      integerType_ = CoinCopyOfArray(rhs.integerType_,numberColumns_);
    779       if (rhs.rowActivity_) {
    780         rowActivity_= ClpCopyOfArray(rhs.rowActivity_, numberRows_);
    781         columnActivity_= ClpCopyOfArray(rhs.columnActivity_,numberColumns_);
    782         dual_= ClpCopyOfArray(rhs.dual_, numberRows_);
    783         reducedCost_= ClpCopyOfArray(rhs.reducedCost_, numberColumns_);
    784       } else {
    785         rowActivity_=NULL;
    786         columnActivity_=NULL;
    787         dual_=NULL;
    788         reducedCost_=NULL;
    789       }
     779      rowActivity_= ClpCopyOfArray(rhs.rowActivity_, numberRows_);
     780      columnActivity_= ClpCopyOfArray(rhs.columnActivity_,numberColumns_);
     781      dual_= ClpCopyOfArray(rhs.dual_, numberRows_);
     782      reducedCost_= ClpCopyOfArray(rhs.reducedCost_, numberColumns_);
    790783      rowLower_ = ClpCopyOfArray ( rhs.rowLower_, numberRows_ );
    791784      rowUpper_ = ClpCopyOfArray ( rhs.rowUpper_, numberRows_ );
  • trunk/Clp/src/ClpNode.cpp

    r1430 r1484  
    851851  }
    852852  delete [] nodeInfo_;
     853#ifdef CLP_INVESTIGATE
     854  // Should be NULL - find out why not?
     855  assert (!saveCosts_);
     856#endif
     857    delete [] saveCosts_;
    853858}
    854859// Return maximum number of nodes
  • trunk/Clp/src/ClpSimplexDual.cpp

    r1452 r1484  
    62186218{
    62196219  if (solveLp) {
     6220    // make sure won't create fake objective
     6221    int saveOptions = specialOptions_;
     6222    specialOptions_ |= 16384;
    62206223    // solve
    62216224    dual(0,7);
     
    62286231      }
    62296232    }
     6233    specialOptions_ = saveOptions;
    62306234    if (problemStatus_==1)
    62316235      return NULL; // say infeasible
Note: See TracChangeset for help on using the changeset viewer.