0026515: Exponential memory usage problems with BOPDS_IndexedMapOfPaveBlock and NColl...
[occt.git] / src / BOPAlgo / BOPAlgo_PaveFiller_1.cxx
index 8eb388e..418bdae 100644 (file)
@@ -34,7 +34,6 @@
 #include <gp_Pnt.hxx>
 #include <IntTools_Context.hxx>
 #include <NCollection_BaseAllocator.hxx>
-#include <NCollection_IncAllocator.hxx>
 #include <TopoDS_Face.hxx>
 #include <TopoDS_Vertex.hxx>
 
 // function: PerformVV
 // purpose: 
 //=======================================================================
-  void BOPAlgo_PaveFiller::PerformVV() 
+void BOPAlgo_PaveFiller::PerformVV() 
 {
   Standard_Boolean bWithSubShape;
   Standard_Integer n1, n2, iFlag, nX, n, aSize, i, j, k, aNbBlocks;
-  Handle(NCollection_IncAllocator) aAllocator;
+  Handle(NCollection_BaseAllocator) aAllocator;
   BOPCol_ListIteratorOfListOfInteger aItLI, aItLI2;
   TopoDS_Vertex aVn;
   BOPDS_ShapeInfo aSIn;
@@ -65,7 +64,8 @@
   aVVs.SetIncrement(aSize);
   //
   //-----------------------------------------------------scope f
-  aAllocator=new NCollection_IncAllocator();
+  aAllocator=
+    NCollection_BaseAllocator::CommonBaseAllocator();
   BOPCol_IndexedDataMapOfIntegerListOfInteger aMILI(100, aAllocator);
   BOPCol_DataMapOfIntegerListOfInteger aMBlocks(100, aAllocator);
   BOPCol_ListOfShape aLV(aAllocator);
   aLV.Clear();
   aMBlocks.Clear();
   aMILI.Clear();
-  aAllocator.Nullify();
 }