From f6c12803bec3fcba60b6ca397f825c27b29dea7e Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Wed, 20 Feb 2019 16:32:23 +0100
Subject: [PATCH] call BasisFactory::clearAll() in finalize to delete all
 static function space data

---
 Common/GmshGlobal.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Common/GmshGlobal.cpp b/Common/GmshGlobal.cpp
index 99967fa10e..06cf1f6a46 100644
--- a/Common/GmshGlobal.cpp
+++ b/Common/GmshGlobal.cpp
@@ -24,6 +24,7 @@ typedef unsigned long intptr_t;
 #include "OS.h"
 #include "Context.h"
 #include "robustPredicates.h"
+#include "BasisFactory.h"
 
 #if defined(HAVE_PARSER)
 #include "Parser.h"
@@ -247,6 +248,9 @@ int GmshFinalize()
   PViewData::removeAllInterpolationSchemes();
 #endif
 
+  // Delete static interpolation bases
+  BasisFactory::clearAll();
+
   // Delete all Gmodels
   while(GModel::list.size() > 0) delete GModel::list[GModel::list.size() - 1];
   std::vector<GModel *>().swap(GModel::list);
-- 
GitLab