0026515: Exponential memory usage problems with BOPDS_IndexedMapOfPaveBlock and NColl...
[occt.git] / src / BOPDS / BOPDS_IteratorSI.cxx
index 3cf6c4c..c59c06a 100644 (file)
@@ -28,7 +28,6 @@
 #include <BOPDS_Tools.hxx>
 #include <BRep_Tool.hxx>
 #include <gp_Pnt.hxx>
-#include <NCollection_IncAllocator.hxx>
 #include <NCollection_UBTreeFiller.hxx>
 #include <TopAbs_ShapeEnum.hxx>
 #include <TopoDS.hxx>
@@ -85,11 +84,12 @@ void BOPDS_IteratorSI::Intersect()
   Standard_Integer aNbS, i, aNbB;
   Standard_Integer aNbSD, iX, j, iDS, jB;
   TopAbs_ShapeEnum aTi, aTj;
-  Handle(NCollection_IncAllocator) aAllocator;
+  Handle(NCollection_BaseAllocator) aAllocator;
   BOPCol_ListIteratorOfListOfInteger aIt;
   //
   //-----------------------------------------------------scope_1 f
-  aAllocator=new NCollection_IncAllocator();
+  aAllocator=
+    NCollection_BaseAllocator::CommonBaseAllocator();
   //
   BOPCol_DataMapOfShapeInteger aMSI(100, aAllocator);
   BOPCol_DataMapOfIntegerInteger aMII(100, aAllocator);
@@ -199,6 +199,5 @@ void BOPDS_IteratorSI::Intersect()
   aMPKXB.Clear();
   aMSB.Clear();
   //
-  aAllocator.Nullify();
   //-----------------------------------------------------scope_1 t
 }