[Bf-blender-cvs] [99912f15e87] master: Fluid: Updated Mantaflow source files

Sebastián Barschkis noreply at git.blender.org
Mon Jan 13 18:57:58 CET 2020


Commit: 99912f15e877686c2750b95d5b3f27d9b815f19d
Author: Sebastián Barschkis
Date:   Mon Jan 13 18:55:58 2020 +0100
Branches: master
https://developer.blender.org/rB99912f15e877686c2750b95d5b3f27d9b815f19d

Fluid: Updated Mantaflow source files

The memory leak described in T72498 has been fixed in Mantaflow, the updated files should reflect this in Blender.

===================================================================

M	extern/mantaflow/helper/pwrapper/registry.cpp
M	extern/mantaflow/preprocessed/fileio/iomeshes.cpp
M	extern/mantaflow/preprocessed/gitinfo.h

===================================================================

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);
diff --git a/extern/mantaflow/preprocessed/fileio/iomeshes.cpp b/extern/mantaflow/preprocessed/fileio/iomeshes.cpp
index 900c9bf2776..79a9e76da3f 100644
--- a/extern/mantaflow/preprocessed/fileio/iomeshes.cpp
+++ b/extern/mantaflow/preprocessed/fileio/iomeshes.cpp
@@ -424,6 +424,7 @@ template<class T> void readMdataUni(const std::string &name, MeshDataImpl<T> *md
     assertMsg(gzread(gzf, &head, sizeof(UniMeshHeader)) == sizeof(UniMeshHeader),
               "can't read file, no header present");
     mdata->resize(head.dim);
+
     assertMsg(head.dim == mdata->size(), "mdata size doesn't match");
 #  if FLOATINGPOINT_PRECISION != 1
     MeshDataImpl<T> temp(mdata->getParent());
diff --git a/extern/mantaflow/preprocessed/gitinfo.h b/extern/mantaflow/preprocessed/gitinfo.h
index 154f928dc2f..aa88515494e 100644
--- a/extern/mantaflow/preprocessed/gitinfo.h
+++ b/extern/mantaflow/preprocessed/gitinfo.h
@@ -1,3 +1,3 @@
 
 
-#define MANTA_GIT_VERSION "commit 761849c592daaea320f9026768b5a0750528009c"
+#define MANTA_GIT_VERSION "commit 3701f32027ab499401581ed70b6999b284635ad8"



More information about the Bf-blender-cvs mailing list