From 6cbf1e1712018bacabc84e81ef251c2a913617e3 Mon Sep 17 00:00:00 2001 From: stevenj Date: Thu, 15 Jul 2010 12:15:40 -0400 Subject: [PATCH] fix failure in C++ (and some other front-ends) when de-allocating an nlopt object with a local optimizer; thanks to Jurgen Werner for the bug report darcs-hash:20100715161540-c8de0-8aa02bad85ddebaae8e38e05825c23c3d850a702.gz --- api/options.c | 1 + 1 file changed, 1 insertion(+) diff --git a/api/options.c b/api/options.c index 60d3d71..d934f71 100644 --- a/api/options.c +++ b/api/options.c @@ -576,6 +576,7 @@ NLOPT_STDCALL nlopt_set_local_optimizer(nlopt_opt opt, nlopt_remove_inequality_constraints(opt->local_opt); nlopt_remove_equality_constraints(opt->local_opt); nlopt_set_min_objective(opt->local_opt, NULL, NULL); + nlopt_set_munge(opt->local_opt, NULL, NULL); opt->local_opt->force_stop = 0; } return NLOPT_SUCCESS; -- 2.30.2