From 2eef4cc1e788c7b61361bcc19b0f80d9948d4c33 Mon Sep 17 00:00:00 2001 From: Leonardo de Moura Date: Tue, 4 Dec 2012 11:59:46 -0800 Subject: [PATCH] forgot synch Signed-off-by: Leonardo de Moura --- src/util/gparams.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/util/gparams.cpp b/src/util/gparams.cpp index 976393e46..7fdc3821a 100644 --- a/src/util/gparams.cpp +++ b/src/util/gparams.cpp @@ -69,13 +69,16 @@ public: } void reset() { - m_params.reset(); - dictionary::iterator it = m_module_params.begin(); - dictionary::iterator end = m_module_params.end(); - for (; it != end; ++it) { - dealloc(it->m_value); + #pragma omp critical (gparams) + { + m_params.reset(); + dictionary::iterator it = m_module_params.begin(); + dictionary::iterator end = m_module_params.end(); + for (; it != end; ++it) { + dealloc(it->m_value); + } + m_module_params.reset(); } - m_module_params.reset(); } // -----------------------------------------------