]> OCCT Git - occt.git/commitdiff
0033340: Modeling Algorithm - Improve memory management performance in the `PaveFiller`
authorakaftasev <akaftasev@opencascade.com>
Fri, 3 Mar 2023 15:43:40 +0000 (18:43 +0300)
committervglukhik <vglukhik@opencascade.com>
Sun, 19 Mar 2023 20:53:53 +0000 (20:53 +0000)
Changed NCollection_BaseAllocator to NCollection_IncAllocator in BOPAlgo_PaveFiller::MakeBlocks()

src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx

index a4e454665d9e8b669996a0256582c697efc0b425..68fc9e9e97b5a3e2811c19cbd7d5b7da412341a7 100644 (file)
@@ -62,6 +62,7 @@
 #include <IntTools_SequenceOfCurves.hxx>
 #include <IntTools_SequenceOfPntOn2Faces.hxx>
 #include <IntTools_Tools.hxx>
+#include <NCollection_IncAllocator.hxx>
 #include <NCollection_Vector.hxx>
 #include <Precision.hxx>
 #include <TColStd_ListOfInteger.hxx>
@@ -578,14 +579,12 @@ void BOPAlgo_PaveFiller::MakeBlocks(const Message_ProgressRange& theRange)
   Standard_Integer i, nF1, nF2, aNbC, aNbP, j;
   Standard_Integer nV1, nV2;
   Standard_Real aT1, aT2;
-  Handle(NCollection_BaseAllocator) aAllocator;
+  Handle(NCollection_BaseAllocator) aAllocator = new NCollection_IncAllocator;
   BOPDS_ListIteratorOfListOfPaveBlock aItLPB;
   TopoDS_Edge aES;
   Handle(BOPDS_PaveBlock) aPBOut;
   //
   //-----------------------------------------------------scope f
-  aAllocator=
-    NCollection_BaseAllocator::CommonBaseAllocator();
   //
   TColStd_ListOfInteger aLSE(aAllocator), aLBV(aAllocator);
   TColStd_MapOfInteger aMVOnIn(100, aAllocator), aMVCommon(100, aAllocator),