]> OCCT Git - occt.git/commitdiff
0033340: Modeling Algorithm - Improve memory management performance in the `PaveFiller`
authorakaftasev <akaftasev@opencascade.com>
Thu, 16 Mar 2023 12:59:49 +0000 (15:59 +0300)
committerakaftasev <akaftasev@opencascade.com>
Thu, 16 Mar 2023 12:59:49 +0000 (15:59 +0300)
Changed NCollection_BaseAllocator to NCollection_IncAllocator in BOPAlgo_PaveFiller::MakeBlocks()

src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx

index a0824caf245a95892aa91687969fb8153e705259..619b626e52ff8d9c0c3c894b385a468f160dd33f 100644 (file)
@@ -67,6 +67,7 @@
 #include <IntTools_SequenceOfPntOn2Faces.hxx>
 #include <IntTools_ShrunkRange.hxx>
 #include <IntTools_Tools.hxx>
+#include <NCollection_IncAllocator.hxx>
 #include <NCollection_Vector.hxx>
 #include <Precision.hxx>
 #include <TColStd_ListOfInteger.hxx>
@@ -483,14 +484,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),