53a1447a |
1 | puts "TODO OCC27318 MacOS: Error : TEST FAILED" |
2 | |
4c0d97ac |
3 | puts "========" |
4 | puts "OCC27318" |
5 | puts "========" |
6 | puts "" |
7 | ################################################################## |
8 | puts "Memory is not released in Select3D_SensitiveSet when destroying AIS_InteractiveContext without removing objects" |
9 | ################################################################## |
10 | |
11 | pload VISUALIZATION QAcommands |
12 | |
13 | # to measure initial memory correctly, open and close interactive context |
14 | # to load FreeImage |
15 | vinit |
16 | vclose |
17 | set aMemInit [meminfo h] |
18 | puts "Initial mem: [expr $aMemInit / (1024 * 1024)] MiB ([expr $aMemInit])" |
19 | |
20 | # create a box and display it in each interactive context. The context is |
21 | # the only instance that references to the box. Therefore, the box must be |
22 | # removed completely after each context's closing |
23 | for {set anIter 0} {$anIter < 300} {incr anIter} { |
24 | vinit |
25 | OCC27318 |
26 | vclose |
27 | } |
28 | |
29 | set aMemAfter [meminfo h] |
30 | puts "Memory after closing interactive context several times: [expr $aMemAfter / (1024 * 1024)] MiB ([expr $aMemAfter])" |
31 | |
32 | set aRatio [expr $aMemAfter / double($aMemInit)] |
33 | |
34 | # check if the memory difference is greater than 5% |
35 | if [expr $aRatio > 1.05] { |
36 | puts "Error : TEST FAILED" |
37 | } |