5 #######################################################################
6 puts "Visualization - improve selection mechanism"
7 # tests memory leaks in creation of selection primitives for connected
8 # interactive objects: checks that there is no "dead links" to reference
9 # interactives after its clearing
10 #######################################################################
13 pload MODELING VISUALIZATION
21 set aMemInit [meminfo h]
24 for {set anIterCount 0} {$anIterCount < $anIterNb} {incr anIterCount} {
27 vconnectto i_1 0 0 0 s -nodisplay
29 for {set i 2} {$i < $aNb} {incr i} { vconnectto i_${i} ${i} 0 0 i_1 -nodisplay; vloadselection i_${i} }
33 set aMemClear [meminfo h]
35 puts "Initial memory : [expr $aMemInit / (1024 * 1024)] MiB"
36 puts "Clearing : [expr $aMemClear / (1024 * 1024)] MiB"
38 set aRatio [expr $aMemClear / double($aMemInit)]
40 # check if the memory difference is greater than 20%
41 if {[expr $aRatio > 1.2]} {
42 puts "Error : TEST FAILED"