Changeset 66


Ignore:
Timestamp:
Oct 13, 2006 4:19:51 PM (13 years ago)
Author:
andreasw
Message:

minor correction in curvature estimator - enough for now

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/devel/Bonmin/src/IpoptInterface/BonCurvatureEstimator.cpp

    r65 r66  
    152152  CurvatureEstimator::~CurvatureEstimator()
    153153  {
    154     delete [] irows_jac_;
    155     delete [] jcols_jac_;
    156     delete [] jac_vals_;
    157     delete [] irows_hess_;
    158     delete [] jcols_hess_;
    159     delete [] hess_vals_;
    160     delete [] x_l_;
    161     delete [] x_u_;
    162     delete [] g_l_;
    163     delete [] g_u_;
    164     delete [] x_free_map_;
    165     delete [] g_fixed_map_;
    166     delete [] lambda_;
     154    if (initialized_) {
     155      delete [] irows_jac_;
     156      delete [] jcols_jac_;
     157      delete [] jac_vals_;
     158      delete [] irows_hess_;
     159      delete [] jcols_hess_;
     160      delete [] hess_vals_;
     161      delete [] x_l_;
     162      delete [] x_u_;
     163      delete [] g_l_;
     164      delete [] g_u_;
     165      delete [] x_free_map_;
     166      delete [] g_fixed_map_;
     167      delete [] lambda_;
     168    }
    167169  }
    168170
     
    242244    DBG_ASSERT(n == n_);
    243245
     246    if (!initialized_) {
     247      Initialize();
     248    }
     249
    244250    if (new_bounds) new_activities = true;
    245251
Note: See TracChangeset for help on using the changeset viewer.