1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-10 18:51:21 +03:00

0023882: Memory leak is reported on BOP in test bugs fclasses bug7287_5.

Test cases which check Boolean Operation algorithm on memory leaks have been rewritten to test the whole algorithm and not a part of it.
This commit is contained in:
emv 2013-04-10 15:05:50 +04:00
parent df017cc9d3
commit 5d05cf31f0
7 changed files with 16 additions and 15 deletions

View File

@ -139,11 +139,12 @@ Standard_Integer bop (Draw_Interpretor& di, Standard_Integer n, const char** a)
aLC.Append(aS1); aLC.Append(aS1);
aLC.Append(aS2); aLC.Append(aS2);
// //
if (!pPF) { if (pPF!=NULL) {
delete pPF; delete pPF;
Handle(NCollection_BaseAllocator)aAL=new NCollection_IncAllocator; pPF=NULL;
pPF=new BOPAlgo_PaveFiller(aAL);
} }
Handle(NCollection_BaseAllocator)aAL=new NCollection_IncAllocator;
pPF=new BOPAlgo_PaveFiller(aAL);
// //
pPF->SetArguments(aLC); pPF->SetArguments(aLC);
// //

View File

@ -12,13 +12,13 @@ puts ""
set BugNumber OCC7287 set BugNumber OCC7287
set NCycles 1000 set NCycles 100
box b1 100 100 100 box b1 100 100 100
box b2 50 50 50 box b2 50 50 50
bop b1 b2
set listmem {} set listmem {}
for {set i 1} {${i} <= ${NCycles}} {incr i } { for {set i 1} {${i} <= ${NCycles}} {incr i } {
bop b1 b2
bopcut r bopcut r
lappend listmem [meminfo h] lappend listmem [meminfo h]

View File

@ -12,13 +12,13 @@ puts ""
set BugNumber OCC7287 set BugNumber OCC7287
set NCycles 1000 set NCycles 100
box b1 10 10 10 100 100 100 box b1 10 10 10 100 100 100
box b2 50 50 50 box b2 50 50 50
bop b1 b2
set listmem {} set listmem {}
for {set i 1} {${i} <= ${NCycles}} {incr i } { for {set i 1} {${i} <= ${NCycles}} {incr i } {
bop b1 b2
bopcut r bopcut r
lappend listmem [meminfo h] lappend listmem [meminfo h]
if { [checktrend $listmem 0 1 "Memory leak detected"] } { if { [checktrend $listmem 0 1 "Memory leak detected"] } {

View File

@ -13,13 +13,13 @@ puts ""
set BugNumber OCC7287 set BugNumber OCC7287
set NCycles 1000 set NCycles 100
box b1 10 10 10 100 100 100 box b1 10 10 10 100 100 100
box b2 50 50 50 box b2 50 50 50
bop b1 b2
set listmem {} set listmem {}
for {set i 1} {${i} <= ${NCycles}} {incr i } { for {set i 1} {${i} <= ${NCycles}} {incr i } {
bop b1 b2
boptuc r boptuc r
lappend listmem [meminfo h] lappend listmem [meminfo h]

View File

@ -12,13 +12,13 @@ puts ""
set BugNumber OCC7287 set BugNumber OCC7287
set NCycles 1000 set NCycles 100
box b1 10 10 10 100 100 100 box b1 10 10 10 100 100 100
box b2 50 50 50 box b2 50 50 50
bop b1 b2
set listmem {} set listmem {}
for {set i 1} {${i} <= ${NCycles}} {incr i } { for {set i 1} {${i} <= ${NCycles}} {incr i } {
bop b1 b2
bopcommon r bopcommon r
lappend listmem [meminfo h] lappend listmem [meminfo h]

View File

@ -12,12 +12,12 @@ puts ""
set BugNumber OCC7287 set BugNumber OCC7287
set NCycles 1000 set NCycles 100
box b1 10 10 10 100 100 100 box b1 10 10 10 100 100 100
box b2 50 50 50 box b2 50 50 50
bop b1 b2
for {set i 1} {${i} <= ${NCycles}} {incr i } { for {set i 1} {${i} <= ${NCycles}} {incr i } {
bop b1 b2
bopfuse r bopfuse r
lappend listmem [meminfo h] lappend listmem [meminfo h]

View File

@ -12,12 +12,12 @@ puts ""
set BugNumber OCC7287 set BugNumber OCC7287
set NCycles 1000 set NCycles 100
box b1 10 10 10 100 100 100 box b1 10 10 10 100 100 100
box b2 50 50 50 box b2 50 50 50
bop b1 b2
for {set i 1} {${i} <= ${NCycles}} {incr i } { for {set i 1} {${i} <= ${NCycles}} {incr i } {
bop b1 b2
bopsection r bopsection r
lappend listmem [meminfo h] lappend listmem [meminfo h]