diff options
author | Sebastián Barschkis <sebbas@sebbas.org> | 2020-01-13 20:55:58 +0300 |
---|---|---|
committer | Sebastián Barschkis <sebbas@sebbas.org> | 2020-01-15 18:27:55 +0300 |
commit | 542e0c67bad1e17ca5d260805d2055f7da506df9 (patch) | |
tree | 5922e8873ccc56e48951a8a60afd788c4b142b6d /extern/mantaflow/helper/pwrapper | |
parent | 3fa548f986271321663c1877ee499e9724a41324 (diff) |
Fluid: Updated Mantaflow source files
The memory leak described in T72498 has been fixed in Mantaflow, the updated files should reflect this in Blender.
Diffstat (limited to 'extern/mantaflow/helper/pwrapper')
-rw-r--r-- | extern/mantaflow/helper/pwrapper/registry.cpp | 8 |
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); |