0032203: Draw Harness, ViewerTest - drop dependency from OpenGL
[occt.git] / tests / bugs / vis / bug29412
1 puts "# ==================================================================="
2 puts "# 0029412: Huge Memory leak since I upgraded to OC 6.9.0"
3 puts "# ==================================================================="
4 puts ""
5
6 pload VISUALIZATION
7 pload OPENGL
8 vcaps -vsync 0
9 vinit View1
10 vglinfo
11
12 OCC29412 100 ;# just to initialize
13
14 meminfo
15 vmemgpu
16
17 set heap_before [meminfo heap]
18 OCC29412
19 set heap_after [meminfo heap]
20
21 meminfo
22 vmemgpu 
23
24 # check that memory increase is moderate: can be up to 75 KiB on Debian;
25 # note that the leak in OCCT 6.9.0 - 7.0.0 was ~ 19 MiB
26 if { $heap_after - $heap_before > 100 * 1024 } {
27   puts "Error: memory leak of [expr ($heap_after - $heap_before) / 1024] KiB"
28 }