]> OCCT Git - occt-copy.git/commitdiff
0023882: Memory leak is reported on BOP in test bugs fclasses bug7287_5.
authoremv <emv@opencascade.com>
Wed, 10 Apr 2013 11:05:50 +0000 (15:05 +0400)
committeremv <emv@opencascade.com>
Fri, 12 Apr 2013 09:37:16 +0000 (13:37 +0400)
Test cases which check Boolean Operation algorithm on memory leaks have been rewritten to test the whole algorithm and not a part of it.

src/BOPTest/BOPTest_BOPCommands.cxx
tests/bugs/fclasses/bug7287_1
tests/bugs/fclasses/bug7287_2
tests/bugs/fclasses/bug7287_3
tests/bugs/fclasses/bug7287_4
tests/bugs/fclasses/bug7287_5
tests/bugs/fclasses/bug7287_6

index 8331f758d9816f43aad64ebe843551d4ececc054..b156207fe59d65561c8998e6a6d666dff596a223 100755 (executable)
@@ -139,11 +139,12 @@ Standard_Integer bop (Draw_Interpretor& di, Standard_Integer n, const char** a)
   aLC.Append(aS1);
   aLC.Append(aS2);
   //
-  if (!pPF) {
+  if (pPF!=NULL) {
     delete pPF;
-    Handle(NCollection_BaseAllocator)aAL=new NCollection_IncAllocator;
-    pPF=new BOPAlgo_PaveFiller(aAL);
+    pPF=NULL;
   }
+  Handle(NCollection_BaseAllocator)aAL=new NCollection_IncAllocator;
+  pPF=new BOPAlgo_PaveFiller(aAL);
   //
   pPF->SetArguments(aLC);
   //
index eb277742052ddbab46bcf5aabf7d8b9a5f3917d7..6bcc66283bab3fa67bbb31c3cbaa712f5fe20e62 100755 (executable)
@@ -12,13 +12,13 @@ puts ""
 
 set BugNumber OCC7287
 
-set NCycles 1000
+set NCycles 100
 box b1 100 100 100
 box b2 50 50 50
-bop b1 b2
 
 set listmem {}
 for {set i 1} {${i} <= ${NCycles}} {incr i } {
+    bop b1 b2
     bopcut r
     
     lappend listmem [meminfo h]
index 8bbc9ba079e783c7d7fb3caab32d3cc9e73f0f3a..e6377858135b632837a0f17d3b01eaa9a38a923f 100755 (executable)
@@ -12,13 +12,13 @@ puts ""
 
 set BugNumber OCC7287
 
-set NCycles 1000
+set NCycles 100
 box b1 10 10 10 100 100 100
 box b2 50 50 50
-bop b1 b2
 
 set listmem {}
 for {set i 1} {${i} <= ${NCycles}} {incr i } {
+    bop b1 b2
     bopcut r
     lappend listmem [meminfo h]
     if { [checktrend $listmem 0 1 "Memory leak detected"] } {
index b529d2458417ca1b1c6fc603fd0e4415a02533db..bf66c2066c0ccf842f45159b90cc863730dc7057 100755 (executable)
@@ -13,13 +13,13 @@ puts ""
 set BugNumber OCC7287
 
 
-set NCycles 1000
+set NCycles 100
 box b1 10 10 10 100 100 100
 box b2 50 50 50
-bop b1 b2
 
 set listmem {}
 for {set i 1} {${i} <= ${NCycles}} {incr i } {
+    bop b1 b2
     boptuc r
 
     lappend listmem [meminfo h]
index 827dede2b5af4b634544d35a4ced39ff173a8423..427e84f298892247c1590bf9f4c8cdc1608c57fb 100755 (executable)
@@ -12,13 +12,13 @@ puts ""
 
 set BugNumber OCC7287
 
-set NCycles 1000
+set NCycles 100
 box b1 10 10 10 100 100 100
 box b2 50 50 50
-bop b1 b2
 
 set listmem {}
 for {set i 1} {${i} <= ${NCycles}} {incr i } {
+    bop b1 b2
     bopcommon r
 
     lappend listmem [meminfo h]
index c8ec59503ac217b81f31b6a131a6f65853dec245..4290eed288592ad2813fd9ce6a7eeb922c076a12 100755 (executable)
@@ -12,12 +12,12 @@ puts ""
 
 set BugNumber OCC7287
 
-set NCycles 1000
+set NCycles 100
 box b1 10 10 10 100 100 100
 box b2 50 50 50
-bop b1 b2
 
 for {set i 1} {${i} <= ${NCycles}} {incr i } {
+    bop b1 b2
     bopfuse r
 
     lappend listmem [meminfo h]
index ac32a9c39ae60c6e52e25d5afda8403d286499ab..590285a3144cefffe9e488252538a2d597d9aa2c 100755 (executable)
@@ -12,12 +12,12 @@ puts ""
 
 set BugNumber OCC7287
 
-set NCycles 1000
+set NCycles 100
 box b1 10 10 10 100 100 100
 box b2 50 50 50
-bop b1 b2
 
 for {set i 1} {${i} <= ${NCycles}} {incr i } {
+    bop b1 b2
     bopsection r
 
     lappend listmem [meminfo h]