Changeset 1485 for branches


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

memory leak

Location:
branches/sandbox/Clp/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/sandbox/Clp/src/ClpModel.cpp

    r1475 r1485  
    780780            savedColumnScale_ = NULL;
    781781            integerType_ = CoinCopyOfArray(rhs.integerType_, numberColumns_);
    782             if (rhs.rowActivity_) {
    783                 rowActivity_ = ClpCopyOfArray(rhs.rowActivity_, numberRows_);
    784                 columnActivity_ = ClpCopyOfArray(rhs.columnActivity_, numberColumns_);
    785                 dual_ = ClpCopyOfArray(rhs.dual_, numberRows_);
    786                 reducedCost_ = ClpCopyOfArray(rhs.reducedCost_, numberColumns_);
    787             } else {
    788                 rowActivity_ = NULL;
    789                 columnActivity_ = NULL;
    790                 dual_ = NULL;
    791                 reducedCost_ = NULL;
    792             }
     782            rowActivity_ = ClpCopyOfArray(rhs.rowActivity_, numberRows_);
     783            columnActivity_ = ClpCopyOfArray(rhs.columnActivity_, numberColumns_);
     784            dual_ = ClpCopyOfArray(rhs.dual_, numberRows_);
     785            reducedCost_ = ClpCopyOfArray(rhs.reducedCost_, numberColumns_);
    793786            rowLower_ = ClpCopyOfArray ( rhs.rowLower_, numberRows_ );
    794787            rowUpper_ = ClpCopyOfArray ( rhs.rowUpper_, numberRows_ );
  • branches/sandbox/Clp/src/ClpNode.cpp

    r1475 r1485  
    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
Note: See TracChangeset for help on using the changeset viewer.