1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00
Files
occt/tests/bugs/caf/bug114
abv 5789daf94d Restoring test cases removed by last commit.
Enabling command QAAIAGetColor2d on Windows in order to allow relevant tests to pass.
2012-12-18 13:24:12 +04:00

28 lines
609 B
Plaintext

puts "==========="
puts "OCC114"
puts "==========="
# Max number of iterations for computing memory leackage
set i_max 20
puts "Amount of iterations is $i_max"
NewDocument D MDTV-Standard
UndoLimit D 10
restore [locate_data_file OCC114.brep] s
set listmem {}
for {set i 1} {${i} <= ${i_max}} {incr i} {
OpenCommand D
SetShape D 0:1 s
AbortCommand D
# check memory usage (with tolerance equal to half page size)
lappend listmem [expr [meminfo w] / 1024]
if { [checktrend $listmem 0 1 "Memory leak detected"] } {
puts "No memory leak, $i iterations"
break
}
}