Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'extern/mantaflow/helper/pwrapper/registry.cpp')
-rw-r--r--extern/mantaflow/helper/pwrapper/registry.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/extern/mantaflow/helper/pwrapper/registry.cpp b/extern/mantaflow/helper/pwrapper/registry.cpp
index 332b9e158ac..3cdc2248b98 100644
--- a/extern/mantaflow/helper/pwrapper/registry.cpp
+++ b/extern/mantaflow/helper/pwrapper/registry.cpp
@@ -128,6 +128,7 @@ class WrapperRegistry {
void registerOperators(ClassData *cls);
void addParentMethods(ClassData *cls, ClassData *base);
WrapperRegistry();
+ ~WrapperRegistry();
std::map<std::string, ClassData *> mClasses;
std::vector<ClassData *> mClassList;
std::vector<InitFunc> mExtInitializers;
@@ -210,6 +211,13 @@ WrapperRegistry::WrapperRegistry()
addClass("PbClass", "PbClass", "");
}
+WrapperRegistry::~WrapperRegistry()
+{
+ // Some static constructions may have called WrapperRegistry.instance() and added
+ // own classes, functions, etc. Ensure everything is cleaned up properly.
+ cleanup();
+}
+
ClassData *WrapperRegistry::getOrConstructClass(const string &classname)
{
map<string, ClassData *>::iterator it = mClasses.find(classname);