]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
[EDF30834] : Fix memory leak
authorAnthony Geay <anthony.geay@edf.fr>
Thu, 29 Aug 2024 08:06:03 +0000 (10:06 +0200)
committerAnthony Geay <anthony.geay@edf.fr>
Thu, 29 Aug 2024 08:06:03 +0000 (10:06 +0200)
src/ShapeRecogn/ShapeRecognMeshBuilder.cxx
src/ShapeRecogn/ShapeRecognMeshBuilder.hxx
src/ShapeRecogn/Test/ConeTest.cxx
src/ShapeRecogn/Test/CylinderTest.cxx
src/ShapeRecogn/Test/PlaneTest.cxx
src/ShapeRecogn/Test/SphereTest.cxx
src/ShapeRecogn/Test/TorusTest.cxx

index f0a2b058180d7db897f057983666c85be7b3b90b..9118fa7585cd4566e7b855afe1b4e8d11d8df59c 100644 (file)
@@ -26,7 +26,7 @@ ShapeRecognMeshBuilder::~ShapeRecognMeshBuilder()
     mesh->decrRef();
 }
 
-ShapeRecognMesh *ShapeRecognMeshBuilder::recognize()
+MCAuto<ShapeRecognMesh> ShapeRecognMeshBuilder::recognize()
 {
     mesh->incrRef();
     NodesBuilder nodesBuilder(mesh);
@@ -48,7 +48,7 @@ ShapeRecognMesh *ShapeRecognMeshBuilder::recognize()
     recognMesh->center = buildCenter();
     recognMesh->axis = buildAxis();
     recognMesh->apex = buildApex();
-    return recognMesh.retn();
+    return recognMesh;
 }
 
 const Nodes *ShapeRecognMeshBuilder::getNodes() const
index eee7c150739ee06362ae2216d9ad53083e4336c0..6ac42743c7b2bedc2e802901f962f9a6807e68f1 100644 (file)
@@ -40,7 +40,7 @@ namespace MEDCoupling
         const Nodes *getNodes() const;
         const Areas *getAreas() const;
 
-        ShapeRecognMesh *recognize();
+        MCAuto<ShapeRecognMesh> recognize();
 
     private:
         // Node properties
index d25f4a792f1f98a8e5c34615490c26d1668b3740..b43616c4f69b3e6c2c23835effb682159459c3c7 100644 (file)
@@ -1,6 +1,7 @@
 #include "ConeTest.hxx"
 
 #include "ShapeRecognMeshBuilder.hxx"
+#include "ShapeRecognMesh.hxx"
 #include "Areas.hxx"
 #include "MathOps.hxx"
 #include "TestInterpKernelUtils.hxx" // getResourceFile()
index 47f6ac3d3bfd76c005f144e8ff10cd30753ff6d0..abe69828a475ba5a921036efecdf12958397c7cc 100644 (file)
@@ -1,6 +1,7 @@
 #include "CylinderTest.hxx"
 
 #include "ShapeRecognMeshBuilder.hxx"
+#include "ShapeRecognMesh.hxx"
 #include "Areas.hxx"
 #include "MathOps.hxx"
 #include "TestInterpKernelUtils.hxx" // getResourceFile()
index 6f47f161c99e0587c5c7a0c778e03e7434c5c03b..ea11532529f8a6990fcd19be4218844462695110 100644 (file)
@@ -1,6 +1,7 @@
 #include "PlaneTest.hxx"
 
 #include "ShapeRecognMeshBuilder.hxx"
+#include "ShapeRecognMesh.hxx"
 #include "Areas.hxx"
 #include "MathOps.hxx"
 #include "TestInterpKernelUtils.hxx" // getResourceFile()
index 4d7f64ecb673aed1ed718acb7cc057f3f5e86041..f0b82488630f07ae2d5ca5a8e32c1dffff67f641 100644 (file)
@@ -1,6 +1,7 @@
 #include "SphereTest.hxx"
 
 #include "ShapeRecognMeshBuilder.hxx"
+#include "ShapeRecognMesh.hxx"
 #include "Areas.hxx"
 #include "MathOps.hxx"
 #include "TestInterpKernelUtils.hxx" // getResourceFile()
index 6e24d10eeb4ad0a10be2ea64ca1f55dd3fa27fc6..9b55f23d008d5de3fb1bb6d5c3dd6bc7c0f752c3 100644 (file)
@@ -4,6 +4,7 @@
 #include "Areas.hxx"
 #include "MathOps.hxx"
 #include "TestInterpKernelUtils.hxx" // getResourceFile()
+#include "ShapeRecognMesh.hxx"
 
 using namespace MEDCoupling;