Changeset 153


Ignore:
Timestamp:
Jun 16, 2009 1:01:57 AM (12 years ago)
Author:
pbelotti
Message:

pointers to CouenneObject? were deleted more than once as there are multiple copies of CouenneProblem?

Location:
trunk/Couenne/src/problem
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Couenne/src/problem/CouenneProblemConstructors.cpp

    r151 r153  
    137137  feas_tolerance_ (p.feas_tolerance_),
    138138  dependence_   (p.dependence_),
    139   objects_      (p.objects_),
     139  objects_      (p.objects_), // NO! have to copy all of them
    140140  integerRank_  (NULL),
    141141  numberInRank_ (p.numberInRank_),
     
    225225  // clear objects_, but only those elements that were copied from the
    226226  // nullObject in fillDependence.cpp
    227   for (std::vector <CouenneObject *>::iterator i = objects_.begin ();
    228        i != objects_. end (); ++i)
    229     if ((*i) -> Reference () == NULL)
    230       delete (*i);
     227  // for (std::vector <CouenneObject *>::iterator i = objects_.begin ();
     228  //        i != objects_. end (); ++i)
     229//     //if ((*i) && ((*i) -> Reference () == NULL))
     230//       delete (*i);
    231231}
  • trunk/Couenne/src/problem/fillDependence.cpp

    r39 r153  
    3636      CouenneObject *infeasObj = (*i) -> properObject (this, base, jnlst_);
    3737
    38       if (!infeasObj) // found something that will never be infeasibl
     38      if (!infeasObj) // found something that will never be infeasible
    3939        continue;
    4040
Note: See TracChangeset for help on using the changeset viewer.