From: Daniel Arndt Date: Fri, 17 Mar 2017 10:43:52 +0000 (+0100) Subject: Address Assert in destructors X-Git-Tag: v8.5.0-rc1~28^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a8a9eed72a923ee60190103234e4bcb90b135c60;p=dealii.git Address Assert in destructors --- diff --git a/include/deal.II/base/thread_management.h b/include/deal.II/base/thread_management.h index 1e9d9a5b82..fec78854a5 100644 --- a/include/deal.II/base/thread_management.h +++ b/include/deal.II/base/thread_management.h @@ -2973,8 +2973,8 @@ namespace Threads // of the arena". rather, let's explicitly destroy the empty // task object. before that, make sure that the task has been // shut down, expressed by a zero reference count - Assert (task != 0, ExcInternalError()); - Assert (task->ref_count()==0, ExcInternalError()); + AssertNothrow (task != 0, ExcInternalError()); + AssertNothrow (task->ref_count()==0, ExcInternalError()); task->destroy (*task); } diff --git a/include/deal.II/base/timer.h b/include/deal.II/base/timer.h index 155596d278..77d0037637 100644 --- a/include/deal.II/base/timer.h +++ b/include/deal.II/base/timer.h @@ -752,7 +752,12 @@ TimerOutput::Scope::Scope(dealii::TimerOutput &timer_, const std::string §io inline TimerOutput::Scope::~Scope() { - stop(); + try + { + stop(); + } + catch (...) + {} } inline diff --git a/include/deal.II/matrix_free/fe_evaluation.h b/include/deal.II/matrix_free/fe_evaluation.h index a0eed7b69f..ea77ffa148 100644 --- a/include/deal.II/matrix_free/fe_evaluation.h +++ b/include/deal.II/matrix_free/fe_evaluation.h @@ -2419,7 +2419,12 @@ FEEvaluationBase::~FEEvaluationBase () { if (matrix_info != 0) { - matrix_info->release_scratch_data(scratch_data_array); + try + { + matrix_info->release_scratch_data(scratch_data_array); + } + catch (...) + {} } else {